Skip to main content
Premiopolis
Inspiring
August 29, 2016
Answered

How to invoke JavaScript/ExtendScript for Premiere Pro CC in Mac OS

  • August 29, 2016
  • 2 replies
  • 4718 views

Looking for a way to run JavaScript aka ExtendScript in Premiere Pro CC

Here's what I've got for other Adobe Apps, using AppleScript:

tell application "Adobe After Effects CC 2015"

  activate

  set SomeExtendScript to "ThisVariable='Runs This Js Code';"

  DoScript SomeExtendScript

end tell

tell application "Adobe Photoshop CC 2015.5"

  activate

  set SomeExtendScript to "ThisVariable='Runs This Js Code';"

  do javascript SomeExtendScript

end tell

tell application "Adobe Illustrator"

  activate

  set SomeExtendScript to "ThisVariable='Runs This Js Code';"

  do javascript SomeExtendScript

end tell

But so far nothing for Premiere.

tell application "Adobe Premiere Pro CC 2015"

  activate

  set SomeExtendScript to "ThisVariable='Runs This Js Code';"

  -- Does not work: DoScript SomeExtendScript

  -- Does not work: do javascript SomeExtendScript

  -- Does not work: do script SomeExtendScript

end tell

This topic has been closed for replies.
Correct answer Bruce Bullis

ExtendScript = Adobe-flavored JavaScript. Very similar. 

For other Adobe products AppleScript has been the key to doing that.

Yes, but there's no need to limit your solution to one platform!

I'd be curious to see what you're doing, in AE.

Instead of triggering ExtendScript from some external database-driven system, you can put buttons in an HTML5 (JavaScript-based) panel for the user's convenience.

Here's the PProPanel sample; the other samples in the repository have prettier HTML and use modern web frameworks; PProPanel is pretty exhaustive in PPro ExtendScript API usage:

Samples/PProPanel at master · Adobe-CEP/Samples · GitHub

Pushing metadata to projectItems = PProPanel shows how to get and set static (Metadata panel) and temporal (marker) metadata.

Here's "How to set up a panel dev environment":

Samples/ReadMe.md at master · Adobe-CEP/Samples · GitHub

Work through the readme, play with the sample, and feel free to ask me anything!

2 replies

Premiopolis
Inspiring
August 30, 2016

So I've dropped the PProPanel sample into folder (Mac OS): /Library/Application Support/Adobe/CEP/extensions/PanelDir/PProPanel

and run the following in Terminal: defaults write ~/Library/Preferences/com.adobe.CSXS.6.plist PlayerDebugMode 1

Then launched Premiere.

Assuming I got that correct, next step?

Thomas_Szabo
Inspiring
August 30, 2016

Premiopolis schrieb:

So I've dropped the PProPanel sample into folder (Mac OS): /Library/Application Support/Adobe/CEP/extensions/PanelDir/PProPanel

and run the following in Terminal: defaults write ~/Library/Preferences/com.adobe.CSXS.6.plist PlayerDebugMode 1

Then launched Premiere.

Assuming I got that correct, next step?

Premiere menu Window > Extensions > PProPanel

Premiopolis
Inspiring
August 30, 2016

PPro uses the CSXS.6 one.


Great, so the only step I'm aware of having skipped was signing the .zxp bundle, under the assumption the PlayerDebugMode CLI command would be sufficient.  Any other things that might keep your PProPanel from appearing under menu Window > Extensions?

Bruce Bullis
Community Manager
Community Manager
August 29, 2016

JavaScript is not ExtendScript; PPro handles them with two different interpreters.

What is it you're trying to do, in Premiere Pro?

Premiopolis
Inspiring
August 29, 2016

Let me know if I’ve got terms jumbled:

I understand ExtendScript to be an Adobe application, a JavaScript editor which users develop Adobe-enhanced JavaScript code that can be used to automate a variety of Adobe products.

ExtendScript may also be the name given to to the Adobe-version JavaScript described above.  (T/F?)

Your note above — that JavaScript and ExtendScript involve two different interpreters — is news to me.  Interested to know more on that.

Regarding what I’m trying to do:

I develop routines, frequently testing in the ExtendScript App, and then, once developed, run that code from an external Database-driven system that runs any number of custom-developed routines.   This allows external-to-Adobe databases to, for instance, generate customized files in Illustrator, Photoshop, and After Effects.

In this case the goal is to use a similar approach to push metadata from an external database to Premiere Pro project items (source clips).  So far it’s working great in ExtendScript application, but to take this to the next level I need to be able to send JavaScript commands directly to Premiere without using the ExtendScript App.  For other Adobe products AppleScript has been the key to doing that.

Hope all that makes sense.

Bruce Bullis
Community Manager
Bruce BullisCommunity ManagerCorrect answer
Community Manager
August 29, 2016

ExtendScript = Adobe-flavored JavaScript. Very similar. 

For other Adobe products AppleScript has been the key to doing that.

Yes, but there's no need to limit your solution to one platform!

I'd be curious to see what you're doing, in AE.

Instead of triggering ExtendScript from some external database-driven system, you can put buttons in an HTML5 (JavaScript-based) panel for the user's convenience.

Here's the PProPanel sample; the other samples in the repository have prettier HTML and use modern web frameworks; PProPanel is pretty exhaustive in PPro ExtendScript API usage:

Samples/PProPanel at master · Adobe-CEP/Samples · GitHub

Pushing metadata to projectItems = PProPanel shows how to get and set static (Metadata panel) and temporal (marker) metadata.

Here's "How to set up a panel dev environment":

Samples/ReadMe.md at master · Adobe-CEP/Samples · GitHub

Work through the readme, play with the sample, and feel free to ask me anything!