HI previously i was using the same function but now i am unable to get the layer bound with following code
Blockquote
async function getBounds() {
await core.executeAsModal(async () => {
const waj = await batchPlay(
[
{
_obj: “get”,
_target: [
{
_property: “bounds”
},
{
_ref: “layer”,
_enum: “ordinal”,
_value: “targetEnum”
}
],
_options: {
}
}
], {
synchronousExecution: false,
modalBehavior: "fail"
});
const pinned = waj[0];
}, {})
}
this is the error. “The command failed because Photoshop is in a modal state”. No other function is running
same way selection bound is also not working