Skip to main content
tardigrade01
Inspiring
July 12, 2016
Answered

Executing an ExtendScript file from Mac OS Terminal

  • July 12, 2016
  • 1 reply
  • 4251 views

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!

This topic has been closed for replies.
Correct answer Mathias Moehl

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"'

1 reply

tardigrade01
Inspiring
July 12, 2016

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.

Mathias Moehl
Community Expert
Mathias MoehlCommunity ExpertCorrect answer
Community Expert
July 14, 2016

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"'

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
tardigrade01
Inspiring
July 14, 2016

That worked flawlessly. Thanks so much!