• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Run .jsx file in AE from PHP

New Here ,
Mar 15, 2018 Mar 15, 2018

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!

TOPICS
Scripting

Views

1.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 15, 2018 Mar 15, 2018

Copy link to clipboard

Copied

I suggest you go to the Scripting Subspace on this forum and ask there.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Mar 20, 2018 Mar 20, 2018

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 21, 2018 Mar 21, 2018

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"

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 23, 2018 Mar 23, 2018

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines