Execute Javascript Files that have options

Hi!

is there a way to execute an external javascript file which has options and execution buttons in a “ScriptUI Panel” while still beeing within a longer automation run?

Meaning is there a way to “Wait until the user finishes a task and then continue the automation from the point the user was given the javascript script panel dialog.” ?

Or any kind auf “pause” and “continue” functionality that can be “continued” by the user.

Or a way to readout the options and execution buttons as pulldown lists of your automation line pulldowns?

Thanks!

Sascha

Hi, Yes there is a way, but only if you are the creator of the JavaScript code.
Automation Toolkit automatically waits until the JavaScript code is finished, most of the time if you try to run a script with UI it will just open the window and continue with the automation, it happens because the window most of the time is configured to be a “palette window”.
“palette window” - this window mode can run simultaneously with other after effects UI so you won’t stop what you are doing while this window is open, the window won’t take the full focus and make after effects wait.
the solution for this is to use a different type of window called “dialog”, the dialog stops everything until you close the window, so this should solve your problem.
it should look like this(this should be a one line within the menu command) -
var dlg = new Window(“dialog”, “Info”);
dlg.center();
dlg.show();
example - dialog.json (1.5 KB) .
Alon.