Copy link to clipboard
Copied
There are a lot of flavors of answer to this out there, none of which seem to work for me. Let me say right off the bat that my terminal (I'm running Yosemite) recognizes neither '-cmd' nor '-run' nor '-r'.
So, here is the breakdown:
1. I am able to launch AE from the terminal.
2. I am able to open an AE file from the terminal.
~Here is where it gets tricky~
3. I am able to open ExtendScript Toolkit from the terminal, although I would rather not have to involve this app at all, and just automatically run the script.
4. I am able to open my .jsx file in ExtendScript Toolkit from the terminal, although, again, I would rather not have to open ExtendScript Toolkit at all.
5. I am not able to run the .jsx file from the terminal.
How do I do this? Thanks!
1 Correct answer
If you execute this in your Mac OS Terminal and replace the "/path/to/my script.jsx" with the location of your script, it should open AE (if it is not yet running) and execute the script.
osascript -e 'tell application "Adobe After Effects CC 2015" to activate' -e 'tell application "Adobe After Effects CC 2015" to DoScriptFile "/path/to/my script.jsx"'
Copy link to clipboard
Copied
It looks as though I were missing "#target aftereffects", which now executes the script (not without clunkily giving me a warning prompt about executing scripts from outside AE).
If anyone has experience with/suggestions for executing an extendscript file without having to launch ESTK every time, I would appreciate it. We are able to do this in another extension we wrote, but for some reason it isn't working here.
Copy link to clipboard
Copied
If you execute this in your Mac OS Terminal and replace the "/path/to/my script.jsx" with the location of your script, it should open AE (if it is not yet running) and execute the script.
osascript -e 'tell application "Adobe After Effects CC 2015" to activate' -e 'tell application "Adobe After Effects CC 2015" to DoScriptFile "/path/to/my script.jsx"'
Copy link to clipboard
Copied
That worked flawlessly. Thanks so much!
Copy link to clipboard
Copied
Does this still work? It should theoretically work with Premiere Pro as well right?
I tried the following and I got a syntax error saying "120:121: syntax error: Expected end of line, etc. but found “"”. (-2741)"
The command was:
osascript -e 'tell application "Adobe Premiere Pro CC 2018" to activate' -e 'tell application "Adobe Premiere Pro CC 2018" to DoScriptFile "/Users/mymac/Desktop/scripts/Test.jsx"'
Copy link to clipboard
Copied
Same here -- I'm trying to trigger Media Encoder from the commandline, and I get the same Error description and code -2741.
This is on Mac OSX 10.10.5 running the CC 2017 suite.
Copy link to clipboard
Copied
NVIDIA wrote
Does this still work? It should theoretically work with Premiere Pro as well right?
Try this in Terminal:
/Applications/Adobe\ ExtendScript\ Toolkit\ CC/ExtendScript\ Toolkit.app/Contents/MacOS/ExtendScript\ Toolkit -run /Path/To/ExtendScriptFile.jsx
3perf Aug 31, 2018 5:43 AM (in response to NVIDIA)
Same here -- I'm trying to trigger Media Encoder
For AME the same approach didn't work, so try the following JSX (adapted from AME and JSX weird issues )
It targets PPro and uses BridgeTalk to send commands to Media Encoder.
#target premierepro
Bt=new BridgeTalk;
Bt.target="ame";
Bt.body=function(){
alert("yes it's working");
}.toSource()+"()";
Bt.send();
Tried the following systematically commenting and uncommenting the various targets:
#target premierepro
//#target aftereffects
//#target photoshop
//#target illustrator
//#target indesign
//#target ame
//#target audition
alert("Working!");
PPro, AE, Photoshop, Illustrator, and Indesign all work both from ExtendScript and via Terminal.
AME requires BridgeTalk
Audition does not recognize "alert()" from Terminal, nor did it respond to BridgeTalk (at least for the alert function), nor even from ExtendScript.

