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

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
SDK

Views

6.4K

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

Community Expert , 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.

...

Votes

Translate

Translate
Community Expert ,
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?

Votes

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.

Votes

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
Community Expert ,
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"

Votes

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"

Votes

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
Community Expert ,
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?

Votes

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.

Votes

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
Community Expert ,
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.

Votes

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

Votes

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
Community Beginner ,
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...

Votes

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

Votes

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 ,
Nov 21, 2021 Nov 21, 2021

Copy link to clipboard

Copied

Bruce Bullis could you help me with this also? I am trying to open PPro 2022 and run an extendscript from a batch script. I have followed the instructions from justintaylor's post as best I could and no joy.

Votes

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 ,
Nov 22, 2021 Nov 22, 2021

Copy link to clipboard

Copied

Justin's instructions work fine here (once I change '2019' to '2022')...specifically, what failure do you see?

Votes

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 ,
Nov 22, 2021 Nov 22, 2021

Copy link to clipboard

Copied

Thanks for getting back to me 🙂

The issue is that once Premiere opens then the extendscript doesn't run and the batch script hangs until I close Premiere manually. In Premiere's preferences I switched off the home screen so Premiere automatically opens the most recent project. I don't believe the issue is with my extendscript because when run from ExtendScript Toolkit it works as expected.

Here are the steps I took:

1. Added the extendscriptprqe.txt file to the Adobe Premiere Pro 2022 directory

nickw59525541_0-1637590339336.png

2. Run this batch script:

"C:\Program Files\Adobe\Adobe Premiere Pro 2022\Adobe Premiere Pro.exe" /C es.processFile "C:\Users\nickw\Dropbox (Arcus Studios)\Arcus Studios shared workspace\ARC0268 - Ta-Dahs\8) Scenefiles\After Effects\Export Edit_PREM.jsx"

Votes

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 ,
Nov 22, 2021 Nov 22, 2021

Copy link to clipboard

Copied

I've confirmed that, with the 'extendscriptprqe.txt' file present, the following works and executes on Win11:

 

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

 

Contents of test.jsx: 

alert("Whee, I ran a script!");

 

[works regardless of Home screen display preferences]

Feel free to send me your .jsx file, directly.

 

Votes

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 ,
Nov 22, 2021 Nov 22, 2021

Copy link to clipboard

Copied

Thanks for checking that for me. I've managed to get my script to run by moving it to "C:\" and renaming it "test.jsx". It seems like Premiere is picky about special characters in the file path and file name. I renamed the file and replaced the whitespace with an underscore, which has done the trick.

Votes

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 ,
Nov 22, 2021 Nov 22, 2021

Copy link to clipboard

Copied

Glad you got it to work!

Small distinction, which doesn't make much of a difference: I'm pretty sure it's Windows being persnickety about non-escaped white space in path and file names. 🙂

 

 

Votes

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 ,
Nov 22, 2021 Nov 22, 2021

Copy link to clipboard

Copied

LATEST

Sounds about right 🙂

 

Thank you for your help!

Votes

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.

Votes

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.

Votes

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