Adobe After Effects extends script - how to run a script from the command line and pass arguments?

I am trying to run Adobe AE extendscript from the command line. I use the argument "-r" and I can run scripts normally. However, is it possible to pass a script argument?

For example, if I ran this from the command line:

C:\>"C:\Program Files\\Adobe\\Adobe After Effects CC\\Support Files\\AfterFX" -r   "C:\Workspaces\MyAEScripts\AutomateSetup.jsx" hello

Can I get this "hello" in my AutomateSetup.jsx script? I was looking for time to search and can not find a solution.

+4
source share
2 answers

, , -s, AfterEffects script. , (Windows cmd):

afterfx.exe -s "var myArg="I'm a string!"; $.evalFile("Your path to script here")"

myArg script, evalFile. , , , . , , script, , ( ).

After Effects, , , , .

+4

- , script, script.

Mac OS X system.callSystem('pwd').

Windows script system.callSystem('cmd.exe /c "echo %cd%"'').

+3

Source: https://habr.com/ru/post/1527995/


All Articles