PPro CC 2019 - Execute Extendscript through command line

Community Beginner ,
Aug 06, 2019 Aug 06, 2019

Copy link to clipboard

Copied

Hi,

So I know that in After Effects you can use the following command through a batch file to execute extendscript code remotely.

afterfx.exe -r "alert('Hello World');"

The issue I can't seem to find a way to do the equivalent in Premiere.

According to this thread you can do it using the argument /C es.processFile 'path to file' however that does not appear to work.

According to the latest premiere docs you can execute an extendscript file or command this way, but once again it's never mentioned how and searching through the docs I can't find anything.

I've already tried using the Process Explorer on a curently opened version of Premiere and searching through the stings as per this thread answer, however I couldn't find anything that resembled arguments.

If the command ever did work, did they take it out? And if so why would they not mention that anywhere?
Any help would be much appreciated, thank you.

TOPICS
ExtendScript API, Premiere Pro SDK, Scripting, SDK

Views

2.1K

Likes

translate

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
community guidelines

correct answers 1 Correct Answer

Adobe Community Professional , Aug 07, 2019 Aug 07, 2019
PeMatthew​ So from what I can tell, you can only execute a script from the CLI while launching Premiere, you can't run on an existing Instance.1. Make sure you have a extendscriptprqe.txt file in the executable directory (doesn't matter what's inside)2. To execute a file, use:"C:\Program Files\Adobe\Adobe Premiere Pro CC 2019\Adobe Premiere Pro.exe" /C es.processFile "C:\path\to\test.jsx"3. To execute a string, use:"C:\Program Files\Adobe\Adobe Premiere Pro CC 2019\Adobe Premiere Pro.exe" /C es....

Likes

translate

Translate

Translate
Adobe Community Professional ,
Aug 07, 2019 Aug 07, 2019

Copy link to clipboard

Copied

Wow, I didn't know this was even possible. Yea none of those commands are working for me either, running

"C:\Program Files\Adobe\Adobe Premiere Pro CC 2019\Adobe Premiere Pro.exe" /C es.processFile "C:\Users\Justin\Desktop\extendscriptprqe.jsx"

just throws this error:

bbb_999​ Do you have any examples on how this works and or if it does work in the current release of PPRO?

Likes

translate

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
community guidelines
Adobe Employee ,
Aug 07, 2019 Aug 07, 2019

Copy link to clipboard

Copied

Instead of passing the path to a .txt file, pass the path to the .jsx file you’re trying to execute.

Also, that extendscriptprqe.txt file needs to be present next to the PPro executable, to enable running scripts from the command line.

Likes

translate

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
community guidelines
Adobe Community Professional ,
Aug 07, 2019 Aug 07, 2019

Copy link to clipboard

Copied

bbb_999 My mistake, realized that soon as I posted... Just updated with a .jsx

Okay, now I've got an empty extendscriptprqe.txt file and a test.jsx file in the executable directory, restarted Premiere, and still getting this error:

with command:

"C:\Program Files\Adobe\Adobe Premiere Pro CC 2019\Adobe Premiere Pro.exe" /C es.processFile "C:\Program Files\Adobe\Adobe Premiere Pro CC 2019\test.jsx"

Likes

translate

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
community guidelines
Adobe Employee ,
Aug 07, 2019 Aug 07, 2019

Copy link to clipboard

Copied

Well, I can’t test this from my phone, but im told this works on Windows:

C:\Program Files\Adobe\Adobe Premiere Pro CC 2019\Adobe Premiere Pro.exe" /C es.processFile "C:\path\to\script.jsx"

Likes

translate

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
community guidelines
Adobe Community Professional ,
Aug 07, 2019 Aug 07, 2019

Copy link to clipboard

Copied

bbb_999 Oh cool, it works when Premiere isn't already running! Assuming it can't execute on an already running instance of Premiere, does that right?

Likes

translate

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
community guidelines
Adobe Employee ,
Aug 07, 2019 Aug 07, 2019

Copy link to clipboard

Copied

That sounds totally plausible.

Panels remain the recommended platform, from which to run ExtendScript in PPro.

Likes

translate

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
community guidelines
Adobe Community Professional ,
Aug 07, 2019 Aug 07, 2019

Copy link to clipboard

Copied

PeMatthew​ So from what I can tell, you can only execute a script from the CLI while launching Premiere, you can't run on an existing Instance.

1. Make sure you have a extendscriptprqe.txt file in the executable directory (doesn't matter what's inside)

2. To execute a file, use:

"C:\Program Files\Adobe\Adobe Premiere Pro CC 2019\Adobe Premiere Pro.exe" /C es.processFile "C:\path\to\test.jsx"

3. To execute a string, use:

"C:\Program Files\Adobe\Adobe Premiere Pro CC 2019\Adobe Premiere Pro.exe" /C es.process "alert('hello world');"

As bbb_999 mentioned, CEP Panels really are better suited for running scripts in Premiere. If you want one without a UI, you can make an invisible panel that launches on application start, and then communicate with that externally if you need to through WebSockets.

Likes

translate

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
community guidelines
Participant ,
Sep 21, 2019 Sep 21, 2019

Copy link to clipboard

Copied

Hi you make a reference to and invisible panel. It that the only example you know of? Could you show more examples of one. I can't make sense of the one that is there, and I am not using version control at the moment. Thanks

Likes

translate

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
community guidelines
New Here ,
Mar 25, 2021 Mar 25, 2021

Copy link to clipboard

Copied

On premiere 2021 is doesn't works, if premiere is not running it just doesn't do anything, if already started is says that file doesn't exists...

Likes

translate

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
community guidelines
Adobe Employee ,
Mar 25, 2021 Mar 25, 2021

Copy link to clipboard

Copied

I've confirmed that invoking scripts from a command line does indeed work in PPro 15.x. 

Please send me the command line(s) you're passing, and the script you'd like to invoke. bbb@adobe.com

Likes

translate

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
community guidelines
New Here ,
Mar 13, 2020 Mar 13, 2020

Copy link to clipboard

Copied

Hi, May I ask, /C es.process What does it mean here.

Likes

translate

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
community guidelines
Adobe Employee ,
Mar 13, 2020 Mar 13, 2020

Copy link to clipboard

Copied

That's a command line argument passed to PPro, when trying to execute a script from the command line.

 

Executing scripts from the command line is not at all recommended; Panels are the right place from which to execute scripts.

Likes

translate

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
community guidelines