Copy link to clipboard
Copied
Is there a way to call OS commands via the Premiere scripting API?
Basically I would like to run a python script from within premiere, but I see no way to call a os command.
After Effects has the system.callSystem method, which could look something like this:
cmd = "from sb_pipeline import folderStructure; print folderStructure()"
// Call the python script.
var s = system.callSystem('python -c ' + '"' + cmd + '"');
alert(s);
/Simon
1 Correct answer
Not via ExtendScript, but PPro panels can send command lines to the OS.
https://medium.com/@HallgrimurTh/the-other-api-23357c99c774#.vq22hmit7
Copy link to clipboard
Copied
Not via ExtendScript, but PPro panels can send command lines to the OS.
https://medium.com/@HallgrimurTh/the-other-api-23357c99c774#.vq22hmit7
Copy link to clipboard
Copied
Thanks Bruce.
Still I'm not really sure how to use this (note that I haven't been digging in to the panels yet).
Could you post a sample code where it calls a file from the command line?
/Simon
Copy link to clipboard
Copied
From that web page:
//create folder /tmp
var result = window.cep.process.createProcess(‘/bin/mkdir’,’/tmp');
Copy link to clipboard
Copied
Yeah, but what about starting an application for example? Can I run a command just like I do in the terminal/command prompt? For examnple like this: window.cep.precess.createProcess("C:\Program Files\Adobe\Adobe After Effects CC 2015\Support Files\AfterFX.exe")
Also, I'm not sure how to use this other languege. Are you saying I can just type in the command directly in a panel? Examples? I haven't had time to look into panels yet.
Copy link to clipboard
Copied
Yeah, but what about starting an application for example? Can I run a command just like I do in the terminal/command prompt?
Yes; try it!
Also, I'm not sure how to use this other languege. Are you saying I can just type in the command directly in a panel? Examples? I haven't had time to look into panels yet.
It's JavaScript. Yes, you can fire off command lines, from within a panel. See the CEP HTML Test Extension.

