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

How to run multiple files in one?

Explorer ,
Mar 02, 2017 Mar 02, 2017

Copy link to clipboard

Copied

Hi!

For example i have 5 scripts.

script1.jsx

script2.jsx

...

script5.jsx

I would like to run them on a particular order, but they are too complex to merge into one.

Tell me please, how can i run multiple files in one?

Like i open allscripts.jsx and it contains something like:

runscript('/scripts/script1.jsx');

runscript('/scripts/script2.jsx');

...

runscript('/scripts/script5.jsx');

Thanks!

TOPICS
Scripting

Views

471

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 , Mar 02, 2017 Mar 02, 2017

In this case, You can use evalFile method like below.

$.evalFile("/scripts/script1.jsx");

$.evalFile("/scripts/script2.jsx");

...

$.evalFile("/scripts/script3.jsx");

Votes

Translate

Translate
Adobe
Community Expert ,
Mar 02, 2017 Mar 02, 2017

Copy link to clipboard

Copied

Hi arop16461101​,

an example you can find here: How to run an external script from a specific line

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
Community Expert ,
Mar 02, 2017 Mar 02, 2017

Copy link to clipboard

Copied

In this case, You can use evalFile method like below.

$.evalFile("/scripts/script1.jsx");

$.evalFile("/scripts/script2.jsx");

...

$.evalFile("/scripts/script3.jsx");

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
Explorer ,
Mar 02, 2017 Mar 02, 2017

Copy link to clipboard

Copied

LATEST

Thanks a lot!

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