Answered
How to add the condition to this script?
Hello, please help.
How to add the condition to this script: if the height is from n to n (for example 13000-14000), then ...
function getLayerSizeToCopy(){
var layer = activeDocument.activeLayer; //Grab the currently selected layer
// Calculate length and width based on the rectangular bounds of the selected layer
var length = layer.bounds[2]-layer.bounds[0]; //Grab the length
var width = layer.bounds[3]-layer.bounds[1]; //Grab the width
// Remove pixels from the length/width "200 px" => "200"
length = length.toString().replace(' px', '');
width = width.toString().replace(' px', '');
prompt( "Layer Size: ", length + ", " + width );
}
getLayerSizeToCopy();