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

Call OS commands via scripting

Community Beginner ,
Apr 13, 2016 Apr 13, 2016

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

TOPICS
SDK
1.4K
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

correct answers 1 Correct answer

Adobe Employee , Apr 13, 2016 Apr 13, 2016

Not via ExtendScript, but PPro panels can send command lines to the OS.

https://medium.com/@HallgrimurTh/the-other-api-23357c99c774#.vq22hmit7



Translate
Adobe Employee ,
Apr 13, 2016 Apr 13, 2016

Not via ExtendScript, but PPro panels can send command lines to the OS.

https://medium.com/@HallgrimurTh/the-other-api-23357c99c774#.vq22hmit7



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
Community Beginner ,
Apr 15, 2016 Apr 15, 2016

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

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
Adobe Employee ,
Apr 15, 2016 Apr 15, 2016

From that web page:

//create folder /tmp

var result = window.cep.process.createProcess(‘/bin/mkdir’,’/tmp');

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
Community Beginner ,
Apr 15, 2016 Apr 15, 2016

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.

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
Adobe Employee ,
Apr 15, 2016 Apr 15, 2016
LATEST

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.
_Users_bbb_Desktop_mmm_Machinima_automation_test_v1_prproj__.png

CEP_HTML_Test_Extension

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