Answered
How to simultaneously modify layer names and colors?
make a judgment first:
If the document only has one layer and the layer name is not aa.
I will rename this layer to "aa" and change the color to red
make a judgment first:
If the document only has one layer and the layer name is not aa.
I will rename this layer to "aa" and change the color to red
var d = app.activeDocument;
if (d.layers.length == 1) {
d.layers[0].properties = {name:"aa", layerColor:UIColors.RED}
}
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.