Closed PFython closed 3 years ago
Pymiere wraps Premiere's Javascript Scripting interface. I am not sure it could expose additional options which the scripting interface might not have.
Here is some documentation on that scripting API: https://premiere-scripting-guide.readthedocs.io/index.html
Some functions there do have arguments to suppress UI popups or warnings, but I didn't see it in "createNewSequence". Anyway, maybe those docs help you already so I just wanted to link those.
Hi @PFython ,
Unfortunately as @BigRoy stated, Pymiere wraps Premiere own automation language so we are limited by what it offers.
You have no other choice than avoid using the functions that don't have a suppressUI arg and that require user intervention.
You are mentionning the .save() function but in my testing neither the save() or saveAs() functions are showing dialog boxes.
About the createNewSequence(), here is how you create a sequence without popups :
pymiere.objects.qe.project.newSequence("mySequenceName", sequence_preset)
sequence_preset
being the path of a .sqpreset file, you can find them in your Premiere Pro install folder under Adobe Premiere Pro 2020\Settings\SequencePresets
Thanks Quentin and @BigRoy.
Sorry you're right - save()
and saveAs()
don't show dialogue boxes, I was thinking of quit()
but said the wrong thing.
Thanks for telling me about sequence_preset Quentin. That's really useful!
I think I understand about suppressUI, but just to finally check - is there no other way you know of to simulate either pressing ENTER (to select the default) or Clicking on a button, Selenium-style?
All the best, Peter
Hi @PFython , Unfortunately as @BigRoy stated, Pymiere wraps Premiere own automation language so we are limited by what it offers. You have no other choice than avoid using the functions that don't have a suppressUI arg and that require user intervention. You are mentionning the .save() function but in my testing neither the save() or saveAs() functions are showing dialog boxes. About the createNewSequence(), here is how you create a sequence without popups :
pymiere.objects.qe.project.newSequence("mySequenceName", sequence_preset)
sequence_preset
being the path of a .sqpreset file, you can find them in your Premiere Pro install folder underAdobe Premiere Pro 2020\Settings\SequencePresets
Did Adobe remove the "newSequence" function in an update?
Some methods like pymiere.objects.app.project.createNewSequence() and .save() cause Premiere to pop-up a dialog box prompting for "OK" or "Save Yes/N". This pauses the entire automation workflow while waiting for a user to manually move a script on to the next step.
Feature Request: For such functions, is there a way we can specify the arguments/actions in advance, e.g. using *args/**kwargs, so the pop-up boxes are handled programmatically?