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

Automation Blocks: Trigger script remotely with http / streamdeck ?

Community Beginner ,
Mar 06, 2024 Mar 06, 2024

Copy link to clipboard

Copied

Hi there! I'm just starting to fall in love with Automation Blocks.

 

My use case scenario is:

Make.com-scenario to watch for google sheet changes -> convert to text file in Gdrive -> Push a button on the streamdeck  that sends a http get (or a keyboard shortcut, or something) to trigger script in AutomationBlocks -> reads the text file -> updates mogrts from files.

 

I'm wondering if there's a possibility of triggering scripts remotely, using local http, or some other way? I'm aware of CEP Events. Would I have to learn that, or is there another way of for example simply triggering a script by a local http GET?

 

Thanks!

 

TOPICS
SDK

Views

825

Translate

Translate

Report

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 , Apr 04, 2024 Apr 04, 2024

Update: Today we published Automation Blocks 1.1.000, which has remote execution via http requests built-in.

See here for details:

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

 

Votes

Translate

Translate
Community Expert ,
Mar 06, 2024 Mar 06, 2024

Copy link to clipboard

Copied

Currently, CEP events are the only way to remote-execute Automation Blocks scripts. For details see 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

Votes

Translate

Translate

Report

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 Beginner ,
Mar 06, 2024 Mar 06, 2024

Copy link to clipboard

Copied

Thanks for the quick reply. I figured!

I came across Premiere Remote which allows one to trigger premiere scripts via http. However I'm unsure how to exactly run the function for automation blocks to run a script, using it.

 

They have this as an example script:

function lockVideoLayer(layerNumber) {
  app.enableQE();
  var activeSequence = qe.project.getActiveSequence();
  var someTrack = activeSequence.getVideoTrackAt(layerNumber);
  someTrack.setLock(true);
}

 

.. how would your example script translate into this?

 

Perhaps you can be of aid?

Votes

Translate

Translate

Report

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 ,
Mar 07, 2024 Mar 07, 2024

Copy link to clipboard

Copied

Wow, this looks very cool!

I just read the documentation and it looks like you could simply replace the function "lockVideoLayer" by a function executing something like the sample code for Kbar/QuickMenu.

 

Something like

 

function runAutomationBlocksScript(filePath) {
  var xLib;
  try {
    xLib = new ExternalObject("lib:PlugPlugExternalObject");
  } catch (e) {
    alert("Missing ExternalObject: " + e);
  }

  if (xLib) {
    var eventObj = new CSXSEvent();
    eventObj.type = "com.aescripts.AutomationBlocksAe.runScriptFile";
    eventObj.data = JSON.stringify({
      filePath: filePath,
    });
    eventObj.dispatch();
  }
}

I will schedule some time to do some experiments with this.

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects

Votes

Translate

Translate

Report

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 ,
Mar 07, 2024 Mar 07, 2024

Copy link to clipboard

Copied

I did some first tests and it works nicely 🙂

The code I postedd above is not working, since JSON was not supported. But I did some adjustments to fix that.

 

To use Autmoation Blocks with Premiere Remote do this:

1. follow the instructions here to install and use Premiere Remote.

2. at the step where you should modify "index.tsx", use this file instead.

 

Now assume you have an Automation Blocks script "test.xml", which is located in the folder "/Users/mmohl/Desktop", the you can execute it by opening this URL in your browser:

 

http://localhost:8081/runAutomationBlocksScript?filePath=/Users/mmohl/Desktop/test.xml

 

(assuming that you have Premiere Pro running, Automation Blocks installed and the Premiere Remote panel open inside Premiere Pro).

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects

Votes

Translate

Translate

Report

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 Beginner ,
Mar 07, 2024 Mar 07, 2024

Copy link to clipboard

Copied

This works perfectly! Thank you so much. This opens many possibilities to remote-triggering automations. 

Votes

Translate

Translate

Report

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 ,
Mar 08, 2024 Mar 08, 2024

Copy link to clipboard

Copied

I did some more tests today and was able to achieve the following:
1. Execute Automation Blocks tools using your mobile as input device with Touch Portal

2. Execute Automation Blocks tools via Keyboard Shortcuts on Mac OS using Keyboard Maestro.

 

Executing Automation Blocks tools with Touch Portal

- Install Touch Portal on your computer and your phone and pair them as usual

- create a new button, choose as action "Http Get" and enter as "Get Url" the URL defined in Premiere Remote, i.e. something like

http://localhost:8081/runAutomationBlocksScript?filePath=/Users/mmohl/Desktop/test.xml

to execute the Automation Blocks tool "test.xml" in the folder "/Users/mmohl/Desktop", for example.

 

Touch Portal and Automation Blocks.png

 

Execute Automation Blocks tools with Keyboard Maestro

In Keyboard Maestro you can simply use the "Get URL" action to open the runAutomationBlocksScript url:

Keyboard Maestro and Automation Blocks.png

Then you can trigger it with a keyboard shortcut or any other of the available triggers in Keyboard Maestro

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects

Votes

Translate

Translate

Report

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 ,
Apr 04, 2024 Apr 04, 2024

Copy link to clipboard

Copied

LATEST

Update: Today we published Automation Blocks 1.1.000, which has remote execution via http requests built-in.

See here for details:

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

 

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects

Votes

Translate

Translate

Report

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