Skip to main content
Albert S.
Inspiring
March 19, 2009
Question

Moving a Layer based on percentages via action scripting.

  • March 19, 2009
  • 3 replies
  • 1979 views
Hi,

I am trying to create an action script that will move a layer 90% to the left or right. Can this be done thru actions or is it something that can only be done via JS Scripting. The reason I need percentages is not all images are the same dimensions.

TIA
This topic has been closed for replies.

3 replies

Albert S.
Albert S.Author
Inspiring
March 19, 2009
That worked great, Thanks again.
Albert S.
Albert S.Author
Inspiring
March 19, 2009
Thank you, I will try that.
Inspiring
March 19, 2009
You should be able to do it with either.

With an action set you ruler to percent, select all on the layer you want to move and with the move tool move the image. The amount of the move will be recorded in percent.

With a script use activeDocument.activeLayer.translate( new UnitValue(.9,'%'),undefined) to move to the right or activeDocument.activeLayer.translate( new UnitValue(-.9,'%'),undefined)to move to the left