Running scripts from the command line: Scripting Guide ERROR
Posted: March 4th, 2006, 2:35 am
The example code in the Scripting Guide to launch scripts from the command line contains a grammatical error, that will cause your scripts NOT to run.
Basically, the code therin is formatted using an em-dash – rather than a hyphen - (as Windows expects). If you were to copy and paste the code to a fixed-width code editor, both the characters above would display identically:
When in actual fact they are completely different:
This may lead you to the conclusion that:
a) your script path is wrong
b) you've badly formatted the quotes
c) you're insane
The real answer is "none of the above". Once After Effects reaches the em-dash, it will just presume that you neglected to enter a path.
End result - TYPE the code yourself and save the headaches, or copy and paste the following code:
Happy programming
Basically, the code therin is formatted using an em-dash – rather than a hyphen - (as Windows expects). If you were to copy and paste the code to a fixed-width code editor, both the characters above would display identically:
Code: Select all
- (hyphen)
– (dash)
Therefore running the code, even for testing purposes, will launch After Effects, but throw the error: "After Effects error: invalid file location specification (must include name)."- (hyphen)
– (dash)
This may lead you to the conclusion that:
a) your script path is wrong
b) you've badly formatted the quotes
c) you're insane
The real answer is "none of the above". Once After Effects reaches the em-dash, it will just presume that you neglected to enter a path.
End result - TYPE the code yourself and save the headaches, or copy and paste the following code:
Code: Select all
afterfx.exe -s "alert ('You just sent an alert to After Effects')"
afterfx.exe -r c:\temp\yourAEScriptHere.jsx
Happy programming
