Copy link to clipboard
Copied
Hi everyone,
I have a script that make some photoshop montage on a picture I put in argument. Right now I am able to launch this script one at a time. If I launch the script twice (on different image) it bug don't process the two correctly.
I might want to make a sort of a multithreading of this script. Is it a matter of a script, like never use "app.activeDocument" or is it a different way to start the document you want to process ? Or even, is this possible at all?
Thanks for your answers,
Moving post to Photoshop Scripting forum.
You can only run one script at a time. You can create a script that batch processes your images, or you can run your script in the batch or image processor, if you first create an action to run your script.
Copy link to clipboard
Copied
Moving post to Photoshop Scripting forum.
You can only run one script at a time. You can create a script that batch processes your images, or you can run your script in the batch or image processor, if you first create an action to run your script.
Copy link to clipboard
Copied
Multithreading is basically impossible with scripts, it blocks the whole app. But you should be able to basically wrap your script with
var n = app.documents.length
for (var i=0; i<n; i++) {
// initialize any variables you assumed to null
app.activeDocument = app.documents
// your script
}