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!
"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"
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"
Copy link to clipboard
Copied
Hi Alex,
Thanks a lot, that worked like a charm!