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

Trying to launch program from Command Line

New Here ,
Sep 16, 2015 Sep 16, 2015

Hello!

I am trying to figure out how to get programs to launch from the Command Line. Been searching around on google for days and haven't found any solutions that are working for me.

Here's the code I am trying to do:

system.callSystem("cmd /c \""C:\\Program Files\\Adobe\\Adobe After Effects CC 2014\\Support Files\\aerender.exe -project  + app.project.file.fsName"\"");

The idea is that, in my script, once all the other functions of the script have taken place, the compositions that have been sent to the render queue will be rendered, but in the background using aerender. I cannot get ae render to launch and I know it is probably some dumb syntax error on my part but I have been pulling my hair out trying to fix it.

Also, if it's possible. Is there a way to have the script resume and go on to it's next lines of code once the command line render has finished?

Please and thanks!

TOPICS
Scripting
2.0K
Translate
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 ,
Sep 16, 2015 Sep 16, 2015
system.callSystem("cmd /c \""C:\\Program Files\\Adobe\\Adobe After Effects CC 2014\\Support Files\\aerender.exe -project  + app.project.file.fsName"\"");

I know on Mac you have to escape all spaces in any file path for command line string.

So Adobe After Effects CC 2014 would be Adobe\ After\ Effects\ CC\ 2014

You also need a space between the -project flag and the file path.

-project + " " + app.project.file.fsName


I haven't messed with the Windows side of command line so I might be wrong with this info.

In terminal on Mac it looks like this...

/Applications/Adobe\ After\ Effects\ CC\ 2014/aerender -project /Users/myMachine/Desktop/SAMPLE.aep

Also, if it's possible. Is there a way to have the script resume and go on to it's next lines of code once the command line render has finished?

The return from a command line call will return once that command is finished. In this case once the render itself completes. I was trying to get render feedback live at one point and it would only return the final "Render finished.." result. Because of that my script was blocked until that result came back, then it continued on with the rest of my code.

Translate
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
Explorer ,
Sep 16, 2015 Sep 16, 2015

You have an error with your quotes.

samw99989298 wrote:

system.callSystem("cmd /c \""C:\\Program Files\\Adobe\\Adobe After Effects CC 2014\\Support Files\\aerender.exe -project  + app.project.file.fsName"\"");

Here is the fixed code(if your file location have space in the path):

system.callSystem('"C:/Program Files/Adobe/Adobe After Effects CC 2014/Support Files/aerender.exe" -project "' + app.project.file.fsName + '"');

(if not):

system.callSystem('"C:/Program Files/Adobe/Adobe After Effects CC 2014/Support Files/aerender.exe" -project' + app.project.file.fsName);

Translate
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
New Here ,
Sep 21, 2015 Sep 21, 2015
LATEST

Thanks for the help! Super swamped on a project, but will try and make it work when I get some free time this week.

Translate
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