Didn’t notice this before and not sure when it started happening, but running even the simplest BatchPlay produces an error:
let exec = require('photoshop').core.executeAsModal(async () => {
const result = require("photoshop").action.batchPlay(
[
{
"_obj": "select",
"_target": [{"_ref": "paintbrushTool"}]
}
], {});
}, {"commandName": "test"})
Command executes as expected, but there’s an error
Ps restart didn’t help
Any idea what to check?
Win 10
Ps 23.3.2
Manifest v4
API v2
Maher
2
I tested you code in inspector, it worked as expected and promise was fulfilled with no errors.
Win 11
Ps 23.3.0
Manifest v4
API v2
I suspect this will also work on Ps v23.3.1
This appeared very recently, just didn’t notice which update
As the error appeared unexpectedly, it also went away the same way. I have no idea why this was happening
Jarda
5
Can you actually run batchPlay async without await
inside exeModal? Isn’t modal state already gone when you try to modify document?
I actually had synchronousExecution: true
when I noticed this. Anyway, there’s no more error even still on same versions of everything