Highlighted

How to use system.callSystem in extendscript?

Contributor ,
Aug 02, 2020

Copy link to clipboard

Copied

I'm trying to undertand if/how I can open an external program from After Effects by using extendscript to send a command through the cmd line (system.callSystem), but can't work it out...

For example, to open a version of Premiere Pro from command line I can use the direct path:

cd C:\Program Files\Adobe\Adobe Premiere Pro CC 2019\ && "Adobe Premiere Pro.exe"

 

But when I try that in extendscript via system.callSystem() it doesn't work:

system.callSystem("cmd.exe /c \"cd C:\Program Files\Adobe\Adobe Premiere Pro CC 2019\ && "Adobe Premiere Pro.exe"\"");

 

How do I pass paths and commands to cmd correctly?

 

TOPICS
How to, Scripting

Views

72

Likes

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

How to use system.callSystem in extendscript?

Contributor ,
Aug 02, 2020

Copy link to clipboard

Copied

I'm trying to undertand if/how I can open an external program from After Effects by using extendscript to send a command through the cmd line (system.callSystem), but can't work it out...

For example, to open a version of Premiere Pro from command line I can use the direct path:

cd C:\Program Files\Adobe\Adobe Premiere Pro CC 2019\ && "Adobe Premiere Pro.exe"

 

But when I try that in extendscript via system.callSystem() it doesn't work:

system.callSystem("cmd.exe /c \"cd C:\Program Files\Adobe\Adobe Premiere Pro CC 2019\ && "Adobe Premiere Pro.exe"\"");

 

How do I pass paths and commands to cmd correctly?

 

TOPICS
How to, Scripting

Views

73

Likes

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
Aug 02, 2020 0
Community Beginner ,
Aug 02, 2020

Copy link to clipboard

Copied

example of running python from extendscript: 

var f = File('C:/Users/mr big/Dropbox/code/python/after effects extend script/mostly black/1.py');
f.execute();

Likes

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
Reply
Loading...
Aug 02, 2020 0
Contributor ,
Aug 02, 2020

Copy link to clipboard

Copied

That's helpful to know thanks. But if you were going to tell command prompt to open another application for example VLC... would you do it directly from extendscript? Or would you create a py file then execute that?

Likes

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
Reply
Loading...
Aug 02, 2020 0