Hi all,
I am controlling After Effects CC from another application by invoking JavaScript files from the command line. But the command *always* restores the maximized window of After Effects. That is, if the After Effects application is maximized, it always *restores* it, every time I invoke the JavaScript file through the command line (e.g. through Windows cmd prompt or through my application). When I execute the same JavaScript file through ExtendScript IDE, it doesn't do this erronous behaviour.
For example: "AfterFx.exe -r C:\path\showDialog.jsx"
Contents of showDialog.jsx:
----------
alert("Showing Dialog from JSX file");
----------
My question is: Is there *any way* to mimic what ExtendScript does to invoke JavaScript files?
From listening on Windows processes, it seems that ExtendScript tacks on some JavaScript code, dynamically, to do the execution (i.e. couldn't trace any command line processes/arguments). But I can't seem to figure out what exact JavaScript code it invokes. ExtendScript also seems to be working via Bridge.
I get the same "restore window" behaviour when I try to use "-s" argument with the JavaScript expression passed as a string argument or if I use "AfterFx.com" instead of "AfterFx.exe". I couldn't find any documentation for what command line parameters are supported for AfterFx (other than "-r" and "-s") and what Extend Script might be doing exactly to invoke the .jsx files. I managed to take a peek at the executable binary of AfterFx.exe (through a hex editor) and noticed the following switches.
-rquiet, -noerr, -noui, -debug, -livelink, -selflink, -headlessonly, -rquiet, -rq, -mp
But I couldn't get the "window restoring" behaviour to stop with any of the parameters.
Any advice will be really appreciated.
Thanks.