Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Execution of a script within a script

  • Execution of a script within a script

    Posted by Stephane Levy on March 25, 2022 at 3:43 pm

    How can I, in a script script2.jsx, call the execution of an existing script, script1.jsx ?

    For instance, if I want to run a plug-in.

    Thanks.

    Stephane Levy replied 4 years, 1 month ago 2 Members · 2 Replies
  • 2 Replies
  • Walter Soyka

    March 25, 2022 at 6:39 pm

    1) If the script is installed in one of Ae’s default application or user script folders, it will appear as a menu item. That means you can call it as such:

    app.executeCommand(app.findMenuCommandId("myGreatScript.jsx"));

    2) If you know where the file sits on disk, you can call tell Ae’s scripting engine to evaluate it:

    $.evalFile("C:/path/to/myGreatScript.jsx");

  • Stephane Levy

    March 25, 2022 at 7:59 pm

    Thanks, it works. I now a have a new question.

    After the execute command line in the script, I have actions that depend on the output of the .jsxbin file that was executed. When the .jsxbin file is executed, I’m guided via a UI that prompts me to set different parameters and validate actions one after the other. I would like to wait for this sequence of actions to be finished, before subsequent lines in my script are executed. How could I achieve this? Thanks.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy