Hi I am trying to modify this script by changing the ‘ca’ to something else more relevant to my project in this case ‘PBW’. But I get this error whenever I change it.Â
could someone tell me why this is happening? I would love to be able to rename layers and change the names according to my project.
#target illustrator
Â
var docRef = app.activeDocument;
Â
with (docRef) {
for (var i = 0; i < layers.length; i++) {
layers[i].name = 'ca' + (layers.length - i).toString();
}
}
 #target illustrator
Â
var docRef = app.activeDocument;
Â
with (docRef) {
for (var i = 0; i < layers.length; i++) {
layers[i].name = ‘PBW’ + (layers.length - i).toString();
}
}
