Skip to main content
Inspiring
April 11, 2013
Question

How do I align several layers on top or on the center ?

  • April 11, 2013
  • 1 reply
  • 960 views

Hi all, I'm starting to work on the JS and still can not understand how to make the alignment of the images.I will create a window, it will be a few buttons.

Prompt at the same time, where read about ActionReference();

thnks !

This topic has been closed for replies.

1 reply

Inspiring
April 12, 2013

I am not clear about what you are asking.

There are several ways to align a layer. I feel the easiest way is to use the scriptlistener plugin to record aligning a layer. If you don't want to use Action Manager code you can align the layer by getting it's current bounds then using layer.translate to move the layer.

You can read about creating a window/dialog in the JavaScript Tools Guide. Creating dialog controls such as buttons are also covered in that guide.

There is not much info about ActionReference but some can be found in the JavaScript Reference. You might also want to look under the app object methods for executeAction, charIDToTypeID, etc.

Andy_Bat1Author
Inspiring
April 12, 2013

Thanks, but I'm have problem to align 2 (or more) layers with masks and images. Look video http://www.youtube.com/watch?v=uIYblodKEuc . At first part two layers align right with PS tools. At second half I'm load images into red section and using masks - aligment not possible !

About second question - where I'm can read infromation about executeActions and so.. ?

Inspiring
April 12, 2013

I can not understand from the video why you can not align layers with masks. I am able to align masked layers.

The only official Adobe info about using Action Manager with JavaScript is in the JavaScript Reference. There may be more info in the Photoshop SDK  but that is for C programmers.