What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Reply to thread

This code will duplicate the current layer, select the duplicate and move it to the right by the layers width.


[code]

#target photoshop

if(documents.length){

var startRulerUnits = app.preferences.rulerUnits;

app.preferences.rulerUnits = Units.PIXELS;

var dup =activeDocument.activeLayer.duplicate ();

var LB = activeDocument.activeLayer.bounds;

var layerWidth = LB[2] - LB[0];

activeDocument.activeLayer= dup;

activeDocument.activeLayer.translate(layerWidth,0);

app.preferences.rulerUnits = startRulerUnits;

}

[/code]


What is our favorite program/app? (Hint - it begins and ends with the letter P)
Back
Top