Answered
This topic has been closed for replies.
Hi, you can try the following script
var _layers = app.activeDocument.layers;
for (var l = 0; l < _layers.length; l++) {
var _textItem = _layers[l].groupItems[0].textFrames[0];
if (_textItem.name != '') {
_layers[l].name = _textItem.name;
}
else {
_layers[l].name = _textItem.contents;
}
}
The above script will work assuming your layer structure is same for all. That means, Each layer will have one group and that group will atleast single textframe. If there are multiple textframes inside teh group, it will pickup the first one and use its name if exists.
Sign up
Already have an account? Login
To post, reply, or follow discussions, please sign in with your Adobe ID.
Sign inSign in to Adobe Community
To post, reply, or follow discussions, please sign in with your Adobe ID.
Sign inEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.
