Copy link to clipboard
Copied
Hello, I am trying to execute .jsx file via PHP server to start my script automatically, but when AE open file, it says format unsuported.
My execute line is:
shell_exec('"C:\Program Files\Adobe\Adobe After Effects CC 2018\Support Files\AfterFX.exe" C:\Program%20Files\Adobe\Adobe%20After%20Effects%20CC%202018\Support%20Files\Scripts\videov2.jsx');
This command is works fine for PS, but in AE program stops. If I execute script via AESToolkit, all fine. How to solve this problem?
Thanks for all your answers!
Copy link to clipboard
Copied
I suggest you go to the Scripting Subspace on this forum and ask there.
Copy link to clipboard
Copied
Hey Sytrus​ check if this would worl.
osascript -e 'tell application id "com.adobe.aftereffects" to activate DoScriptFile "path/To/Script/File.jsx"'
just add appropriates quotes if needed around the string.
Copy link to clipboard
Copied
The answer from Tomas works on MacOs, but it looks like you are on Windows.
Here is the relevant section of the "After Effects Scripting Guide CS6" about this topic:
If you are familiar with how to run a script from the command line in Windows or via AppleScript, you can
send a script directly to the open After Effects application, so that the application automatically runs the script.
To run a script from the command line, call afterfx.exe from the command line. Use the -r switch and the full
path of the script to run as arguments. This command does not open a new instance of the After Effects application;
it runs the script in the existing instance.
Example (for Windows):
afterfx -r c:\script_path\example_script.jsx
You can use this command-line technique—together with the software that comes with a customizable
keyboard—to bind the invocation of a script to a keyboard shortcut.
Following are examples of Windows command-line entries that will send an After Effects script to the application
without using the After Effects user interface to execute the script.
In the first example, you copy and paste your After Effects script directly on the command line and then run
it. The script text appears in quotation marks following the afterfx.exe -s command:
afterfx.exe -s "alert("You just sent an alert to After Effects")"
Alternatively, you can specify the location of the JSX file to be executed. For example:
afterfx.exe -r c:\myDocuments\Scripts\yourAEScriptHere.jsx
afterfx.exe -r "c:\myDocuments\Scripts\Script Name with Spaces.jsx"
Copy link to clipboard
Copied
The original question seems to be asking how to run After Effects as a back-end process on a Web server. That is strictly prohibited under the terms of the Creative Cloud license.