Answered
Could You Select All Layers Sequentially
I Wish Select All Layer One By One Sequentially. Like 1,2,3,4 so on.
Thanks in Advance

I Wish Select All Layer One By One Sequentially. Like 1,2,3,4 so on.
Thanks in Advance

I want to rename the layer left to right form. I have show the image. check it

Your first screen shot showed that you wanted the artboard numbered top to bottom then left to right, which the previous script that I posted did. You're second screen shot shows left to right then top to bottom. So this script does that:
#target photoshop
var doc = activeDocument;
var artArray = [];
var count = 0;
for(var i=0;i<doc.layers.length;i++){
doc.activeLayer = doc.layers[i];
if(isArtBoard ()){
var dimArt = getArtboardDimensions ()
artArray.push([dimArt[0],dimArt[1],doc.activeLayer])
count++
}
}
artArray.sort(function(a,b){return (a[1]-b[1]) || (a[0]-b[0])});
for (i=0;i<artArray.length;i++){
artArray[i][2].name = 'Artboard ' + (i+1);
}
function isArtBoard()
{
var ref = new ActionReference();
ref.putEnumerated(charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt"));
return executeActionGet(ref).getBoolean(stringIDToTypeID("artboardEnabled"));
}; // end of isArtBoard()
function getArtboardDimensions()
{
var ref = new ActionReference();
ref.putEnumerated(charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt"));
var desc = executeActionGet(ref).getObjectValue(stringIDToTypeID("artboard")).getObjectValue(stringIDToTypeID("artboardRect"));
var left = desc.getDouble(stringIDToTypeID("left"));
var top = desc.getDouble(stringIDToTypeID("top"));
return [left, top]
}; // end of getArtboardDimensions()
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.