Copy link to clipboard
Copied
scripts containing batch play commands not executing after saving as .psjs in PS version 25.11
alert added at the beginning of the execution also didnot execute.
I have tried placing the file in preset/scripts folder as well.
Mac version - Ventura & Monterey
Please let me know how to resolve.
Copy link to clipboard
Copied
Any help is appreciated, as we are not able to execute any scripts
Copy link to clipboard
Copied
Can you get this one-liner to work? There is no BatchPlay, only UXP:
require('photoshop').app.showAlert("Hello world!");
What exact BatchPlay code? Is this a save step? Did you use Photoshop or Alchemist for the code?
What simplification steps have you used for troubleshooting to isolate and identify the issue?
Copy link to clipboard
Copied
Thanks for responding. The provided one line works. But the below sample code for batchplay doesnot .
batchplay is used to run multiple actions . Used photopshop to import the action to script file.
async function samplePixel() {
return await require("photoshop").action.batchPlay([{
_obj: "colorSampler",
_target: {_ref: "document",_enum: "ordinal",_value: "targetEnum"},
samplePoint: {
horizontal: 100,
vertical: 100
}
}], {});
}
let result = await require("photoshop").core.executeAsModal(samplePixel, {"commandName": "Sample Pixel"});