Running a script in Adobe Premiere
I'm trying to find a way to launch scripts in Adobe Premiere. I have scripts working nicely in Adobe Illustrator, After Effects and Photoshop, but unfortunately Premiere doesn't offer script access via a menu item so I have to find another way.
I found an Adobe website that outlines a method of launching scripts in After Effects using the command line (the example below is for Windows). I'm hoping that I can use this method, with tweaks in Premiere on Mac.
https://helpx.adobe.com/after-effects/using/scripts.html
To run a script from the command line, call afterfx.exe from the command line. Use the -r switch and the full path of the script to run as arguments. This command does not open a new instance of the After Effects application; it runs the script in the existing instance.
Example (for Windows):
afterfx -r c:\script_path\example_script.jsx
This is what I'm trying:
const premiereID = "com.adobe.PremierePro.22";
const premiere = sf.ui.app(premiereID);
const premiereLocation = "/Applications/Adobe Premiere Pro 2022/Adobe Premiere Pro 2022.app";
const scriptLocation = "/path/Scripts/Premiere-NewSequence.jsx";
premiere.appActivate();
sf.engine.runInBackground(() => {
sf.system.exec({
commandLine: `"${premiereLocation}" -r "${scriptLocation}"`,
executionMode: 'Background',
});
});
I'm getting an error from my command-line process:
"zsh: permission denied: /Applications/Adobe Premiere Pro 2022/Adobe Premiere Pro 2022.app"
- Christian Scheuer @chrscheuer2022-01-15 10:01:40.135Z
You can do it like this:
const scriptPath = '/Applications/Adobe After Effects 2022/Scripts/Demo Palette.jsx'; sf.system.execAppleScript({ script: ` tell application "Adobe After Effects 2022" DoScriptFile "${scriptPath}" end tell ` });
Christian Scheuer @chrscheuer2022-01-15 10:02:13.643Z
Oops that was for After Effects. Hopefully it's the same in Premiere :)
Christian Scheuer @chrscheuer2022-01-15 11:06:55.558Z
Actually it looks like it's different for Premiere, unfortunately.
- AAndrew Sherman @Andrew_Sherman
Thanks for trying that Christian,
I'll keep trying different methods and will let you know if I find something that works
- DIn reply toAndrew_Sherman⬆:DJH @DJH
I think you can run scripts in premiere with this...
https://knightsoftheeditingtable.com/excalibur- AAndrew Sherman @Andrew_Sherman
Thank, yes I use Excalibur and I've been in contact with the developer, but launching scripts with it is not yet working for me. I'm looking for a way to do it using Soundflow that bypasses third-party extensions.