• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

[JSX] Run a script more than once at the same time ?

New Here ,
Aug 25, 2015 Aug 25, 2015

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,

TOPICS
Actions and scripting

Views

346

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 25, 2015 Aug 25, 2015

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.

Votes

Translate

Translate
Adobe
Community Expert ,
Aug 25, 2015 Aug 25, 2015

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Aug 25, 2015 Aug 25, 2015

Copy link to clipboard

Copied

LATEST

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

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines