• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

2 second help for a noob

New Here ,
Apr 21, 2018 Apr 21, 2018

Copy link to clipboard

Copied

I found a script that does exactly what I need (move layers progressively in PS) but what I don't understand is how to change the movement from the Y axis to the X axis. What in this script is controlling the axis, and how to I change it to move horizontally?

  1. #target photoshop 
  2. app.preferences.rulerUnits = Units.PIXELS; 
  3. var doc =activeDocument 
  4. var moveAmt = -100 
  5. var moveCurrent = -100 
  6. var numLayers = doc.layers.length 
  7. for(var i=1;i<numLayers;i++){ 
  8.     doc.activeLayer = doc.layers 
  9.     try
  10.         doc.activeLayer.translate(0,moveCurrent) 
  11.     } 
  12.     catch(e){} 
  13.     moveCurrent+=moveAmt 
  14.     } 

Original: Progressively move layers PSCC 2015

TOPICS
Actions and scripting

Views

227

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Guide , Apr 22, 2018 Apr 22, 2018

translate(X,Y); 

so the change would be

doc.activeLayer.translate(moveCurrent,0);

modify these variables to suit your needs.

var moveAmt = -100 ;

var moveCurrent = -100 ;

Votes

Translate

Translate
Adobe
Guide ,
Apr 22, 2018 Apr 22, 2018

Copy link to clipboard

Copied

translate(X,Y); 

so the change would be

doc.activeLayer.translate(moveCurrent,0);

modify these variables to suit your needs.

var moveAmt = -100 ;

var moveCurrent = -100 ;

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 22, 2018 Apr 22, 2018

Copy link to clipboard

Copied

LATEST

Perfect, thanks!!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines