Hi!
I’m trying to edit the contents of some text layers.
Since the working env. should open multiple documents, I have to access the target with documentID and layerID.
So, I tried this…which is crushing…
const batchPlay = await require("photoshop").action.batchPlay;
await batchPlay(
[{
"_obj": "set",
"_target": [
{
"_ref": "textLayer",
"_id": parseInt(layerID)
}
],
"documentID": parseInt(docID),
"to": {
"_obj": "textLayer",
"textKey": transString
},
"_isCommand": true,
"_options": {
"dialogOptions": "dontDisplay"
}
}],
{
"synchronousExecution": true,
});
and this…that is also crushing…
const batchPlay = await require("photoshop").action.batchPlay;
await batchPlay(
[{
"_obj": "set",
"_target": [
{
"_ref": "textLayer",
"_id": parseInt(layerID)
},
{
"_ref": "document",
"_id": parseInt(docID)
}
],
"to": {
"_obj": "textLayer",
"textKey": transString
},
"_isCommand": true,
"_options": {
"dialogOptions": "dontDisplay"
}
}], {
"synchronousExecution": true,
});
}
I can’t access a certain layer of a document by using ID…
how can I fix this