Copy link to clipboard
Copied
Hi everyone,
I'm creating a video browser OSX app, that will import files to opened project, open and play it in the source viewer in Premiere Pro.
The app creates a JSX file with:
"#target premierepro";
app.enableQE();
var result=qe.project.importFiles(argv);
var num=qe.project.numItems;
var proje=qe.project.getItemAt(num-1);
proje.openInSource();
qe.source.player.play();
It works correctly in ESTK, but if I open it inside my app, calling:
NSWorkspace *workspace = [NSWorkspace sharedWorkspace];
[workspace openFile:jsxFilePath];
//This exactly the same than opening it in Finder via double-clicking it
It shows me this confirmation dialog (sorry for the Spanish localization)
If I press 'Si(Yes)', the script is executed correctly inside Adode Premiere, if I press 'No', then ESTK opens in Debug mode. This is the same behavior if I open the jsx file in the Finder.
Then, how can I avoid this dialog every time the app runs a script?
Thanks a lot,
Regards,
Why I say partially? Because the alert appears, but before any PremierePro window is launching or any project (previous) is loaded, what pointed me that no useful script could be used in this scenario.
That's correct behavior; many scripts open a project. You need a project open before you can do many things.
If you'd like to talk through how best to support your workflow, write me directly at b b b at adobe dot com.
Copy link to clipboard
Copied
Here's how to send an ExtendScript to PPro, from terminal:
/Applications/Adobe\ Premiere\ Pro\ CC\ 2014/Adobe\ Premiere\ Pro\ CC\ 2014.app/Contents/MacOS/Adobe\ Premiere\ Pro\ CC\ 2014 /C es.processFile /Users/username/Desktop/example.jsx
...and from a Command Prompt:
"C:\Program Files\Adobe\Adobe Premiere Pro CC 2014\Adobe Premiere Pro.exe" /C es.processFile "C:\example.jsx"
Copy link to clipboard
Copied
Thanks a lot!
I tried to run it the same way but with the /r switch, thanks to point me to the /C es.processFile switch. There is no way to find it in any documentation (at least for me...)
What is supposed to do the /C switch? And what is the es.processFile argument? Is there any other es.xxxx command that could be of interest?
Regards
Copy link to clipboard
Copied
/C = nothing useful.
The only other useful option here is that, instead of a file path to a .jsx, you can pass your script as a string;
"C:\Program Files\Adobe\Adobe Premiere Pro CC 2014\Adobe Premiere Pro.exe" /C es.processFile "alert('whee!');"
Copy link to clipboard
Copied
Hi,
Sorry, maybe I'm doing something wrong, or there is a typo error but every time I launch the command in Terminal it opens a new Adobe Premiere instance and no action is taken.
Thanks, and sorry if it's my fault...
Copy link to clipboard
Copied
Currently yes, a new instance will be launched each time, on Mac. We understand that's probably not the behavior you're looking for; A feature, "Run script in already-open PPro Mac, if available", has already been requested; I'll add your vote.
Copy link to clipboard
Copied
Hi, thanks, but this only answer the first part, but no answer the second part: 'no action is taken'.
I'm writing in Terminal:
admin$ /Applications/Adobe\ Premiere\ Pro\ CC\ 2014/Adobe\ Premiere\ Pro\ CC\ 2014.app/Contents/MacOS/Adobe\ Premiere\ Pro\ CC\ 2014 /C es.processFile "alert('Hello');"
And a new Adobe Premiere opens without any action taken (no alert dialog appears)
I tried the same in a Windows machine, just to check the command line parameters:
And in the already opened Adobe Premiere instance an error dialog appears showing that it can't open the project /C es.processFile "alert('whee!')", because this file path doesn't exists in disk:
Are you sure these are the correct command parameters?
Thanks a lot,
Copy link to clipboard
Copied
I'm looking at PPro's source code for processing command line arguments, so...yes.
Error on my part; when passing a script directly, and not a path, use 'es.process', not 'es.processFile'.
I'll look into it further.
Copy link to clipboard
Copied
Okay, I found the Important Detailâ„¢ I'd forgotten to mention...
In order to have PPro respond to scripts passed to it from the command line, there must be a file named 'extendscriptprqe.txt' (contents of file don't matter), next to the application itself (just the .app, you don't have to drill down into package contents on MacOS). I happened to have that file present from previous testing, which is why it worked here for me.
Does that work better?
Copy link to clipboard
Copied
Ok,I still have more doubts than when I wrote my initial question:
/.../Adobe\ Premiere\ Pro\ CC\ 2014 /C es.process "alert('Hello');"
Why I say partially? Because the alert appears, but before any PremierePro window is launching or any project (previous) is loaded, what pointed me that no useful script could be used in this scenario.
<140735216841488> <Contract Violation> <0> inProject != NULL [/cloudroom/releases/2014.09/PremierePro/Mezzanine/Src/ProjectActions.cpp-4452]
Thanks,
Regards,
Copy link to clipboard
Copied
Why I say partially? Because the alert appears, but before any PremierePro window is launching or any project (previous) is loaded, what pointed me that no useful script could be used in this scenario.
That's correct behavior; many scripts open a project. You need a project open before you can do many things.
If you'd like to talk through how best to support your workflow, write me directly at b b b at adobe dot com.
Copy link to clipboard
Copied
I was struggling with running a jsx from commandline as well.
The solution for me was to put the jsx file in the default folder for adobe scripts: "/documents/Adobe Scripts". Whenever a script is launched from that location, it is from a trusted location and no warning will pop-up.
I got the information from this blog:
Find more inspiration, events, and resources on the new Adobe Community
Explore Now