Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

Run a Automation Blocks script from another UIX panel

Explorer ,
Nov 22, 2023 Nov 22, 2023

In Automation Blocks, I have a script called PrepareMyProject.xml

 

Would it be possible to RUN this custom script by pressing a button on another UIX panel?
(So actually: is it possible to make a custom interface to run script, in stead of having to search scripts in the Automation Blocks library.)

TOPICS
SDK
891
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Dec 19, 2023 Dec 19, 2023

update: the new feaure is now published and documented here:

https://docs.mamoworld.com/automation-blocks/executeScriptsCEPEvents

Translate
Participant ,
Nov 22, 2023 Nov 22, 2023

I think you can assign shortcuts to execute scripts in Excalibur. I've read something about the customization options but haven't tried it yet.

 

Hopefully someone else can enlighten us.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 22, 2023 Nov 22, 2023

We support that in the Ae version of Automation Blocks, but unfortunately not in Pr. The only reason we don't support it is because Premiere Pro does not give us a clean way of doing that. From my communications with the Premiere Pro team I understood that they hesitate to give third party extensions the ability to use keyboard shortcuts because they feel they need all shortcuts of the host app itself. I disagree with that view and think the user should descide for what he needs shortcuts and I hope this will be changed in the future.

 

As far as I know, Excalibur monitors the keyboard in the background to work around this limitation, which is a pretty dirty hack with unwanted side effects (like it does not know if a popup dialog is currently open, in which case the keyboard shortcut should be ignored).

 

I want to avoid such hacks and highly encourage everybody to submit a feature request to the Premiere Pro team. Please ask them to give third party CEP and UXP extensions the ability to use keyboard shortcuts, such that Automation Blocks tools could be launched with a keyboard shortcut, like they can in Ae.

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 22, 2023 Nov 22, 2023

Hi Mathias, thanks, but actualy, I was not talking about Keyboard Shortcuts, but about a button in another UXP panel.

So, If I have my own HTML UXP panel, could I launch one of Automation Blocks custom XML script from my script?

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 23, 2023 Nov 23, 2023

Hi,

this is not possible right now, but actually a very interesting feature request! How would you want this feature to work. The easiest way would probably to make Automation Blocks listen to a CEP event in which you simply pass the XML of the tool.

 

Limitations of that approach would be

- If the tool has input blocks, it would execute with those set to their default values, unless we come up with some way to pass input arguments to the event, too. But this sounds rather complex.

- No way to execute the build-in sample tools instantly. You would first need to save a copy of them to an XML file, before you could execute them.

 

Is this what you would need?

 

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 23, 2023 Nov 23, 2023

That sounds awesome. (Parameters for blocks can be set by writing or changing them directly in the XML files. ) So yeah, just being able to run a specific XML path would already do a trick. Thanks!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 24, 2023 Nov 24, 2023

I just implemented a prototype which allows other CEP panel extensions to send events to

- load a xml script into the Automation Blocks UI

- execute the script which is currently loaded into the UI

- execute a script file instantly without loading it into the UI

The last function also does not require the Automation Blocks panel to be open (but it needs to be installed).

 

Here is how it works:

 

// run the script that is currently open in the Automation Blocks UI

var event = new CSEvent('com.aescripts.AutomationBlocksPr.runCurrentScript', 'APPLICATION');
csInterface.dispatchEvent(event);

// load the block script test.xml into the Automation. Blocks UI
var event = new CSEvent('com.aescripts.AutomationBlocksPr.loadScriptFile', 'APPLICATION');
event.data = "/path/to/file/test.xml";
csInterface.dispatchEvent(event);

// execute script test.xml without loading it into the UI
var event = new CSEvent('com.aescripts.AutomationBlocksPr.runScriptFile', 'APPLICATION');
event.data = "/path/to/file/test.xml";
csInterface.dispatchEvent(event);

 

Can you please send me an email to info@mamoworld.com saying that you want to test this feature? Then I can send you the version and we can check if it does what you need before releasing it publicly.

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 24, 2023 Nov 24, 2023

PS: If you use the runScriptFile event, since the script is not loaded into the UI, you also cannot see the execution status (error messages) in the UI. But you can start the CEP debugger by opening in Chrome

http://localhost:2029/
and the Automation Blocks API will write the results in the log you can see there.

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 19, 2023 Dec 19, 2023
LATEST

update: the new feaure is now published and documented here:

https://docs.mamoworld.com/automation-blocks/executeScriptsCEPEvents

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines