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

starting AE + script via .bat file: AE immediately exits

Community Beginner ,
Sep 14, 2017 Sep 14, 2017

Copy link to clipboard

Copied

Hi guys,

I would like to create a .bat file to launch AE and have AE run a .jsx script which has just been automatically created. After reading through the documentation I created the following bat file:

"C:\Program Files\Adobe\Adobe After Effects CC 2015.3\Support Files\AfterFX.exe" -r "C:\shotManager\AE_Scripts\NymusShotManager06.jsx"

cmd.exe

When running the bat file, AE starts but immediately closes before the script has run. As a test I used a completely blank .jsx file in case something broke in the generated .jsx script but the result was exactly the same (AE starting and exiting very shortly after). Do you have any idea what might be the problem?

Thanks in advance!

TOPICS
Scripting

Views

2.3K

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

Enthusiast , Sep 14, 2017 Sep 14, 2017

"C:\Program Files\Adobe\Adobe After Effects CC 2015.3\Support Files\AfterFX.exe" -s "var a = new File("C:\\Users\\admin\\Desktop\\Source1.jsx") ; a.open(); eval(a.read()); app.exitAfterLaunchAndEval = false;

By default After Effects will close after the execution of the script, do avoid that you can manually run the code in AE that will evaluate your script and tell AE don't close.

Also, don't forget to escape backslashes in your script's path. "C:\\Users\\admin\\Desktop\\Source1.jsx"

Votes

Translate

Translate
Enthusiast ,
Sep 14, 2017 Sep 14, 2017

Copy link to clipboard

Copied

"C:\Program Files\Adobe\Adobe After Effects CC 2015.3\Support Files\AfterFX.exe" -s "var a = new File("C:\\Users\\admin\\Desktop\\Source1.jsx") ; a.open(); eval(a.read()); app.exitAfterLaunchAndEval = false;

By default After Effects will close after the execution of the script, do avoid that you can manually run the code in AE that will evaluate your script and tell AE don't close.

Also, don't forget to escape backslashes in your script's path. "C:\\Users\\admin\\Desktop\\Source1.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
Community Beginner ,
Sep 15, 2017 Sep 15, 2017

Copy link to clipboard

Copied

LATEST

Hi Alex,

Thanks a lot, that worked like a charm!

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