extendscriptadobe-premiere

Getting up and running with basic scripting


I am adopting Premier as my main editor, slowly transitioning from another editor that did not offer any scripting/programming access.

The whole reason I picked up Premier is that it offers scripting and a C++ SDK. This is something I will expand into slowly over time.

I have a programming background but am short on time, right now I really just want to invoke premier commands from an external source, such a PowerShell or AutoHotkey.

Simple tasks such as Quick_Edit_SetUp.Jsx that carries out sequential steps, such as:

  1. Open C:\Temp\Quick_Edit.Jsx
  2. Import C:\Users\smith\Videos\Todays_Feed2.mp4 into the Project: Quick_Edit Panel
  3. Create a new sequence
    1. Import C:\Users\smith\Videos\Todays_Feed2.mp4 and place it into the sequence

And another called Quick_Edit_Exit.Jsx that carries out sequential steps, such as:

  1. Close Project without saving
  2. Quit Premiere Process

I recently discovered that you can run arbitrary .JSX code from PowerShell like so:

PremierPro /C es.processFile "C:\TEMP\Test.jsx"        # Contents of Test.Jsx is ===>  alert("Hello, World");

But this requires that Premier also be launched at the same time, otherwise you end up getting the following error:

enter image description here

Is there no way to invoke PremierPro /C es.processFile "C:\TEMP\Test.jsx" against an already running instance of Premier? If the answer is "No", then what route do I need to take be able to achieve my goal of invoking premier commands from an external source, such a PowerShell or AutoHotkey?

I have scoured the docs and what third party help I can find. Some suggest .Jsx others say ExtendScript. Are they not the same thing? Is ExtendScript not just stored in .Jsx files?

Please, I would appreciate any input or articles that demystifies this for me.


Solution

  • The older toolchain ExtendScript Toolkit uses an existing instance of Premiere, rather than spawning a new one as you would with the CLI invokation.