Pro Tools | AppleScript

Macros and Shortcuts for Pro Tools using AppleScript

Since EuControl dose miss out on some features (you can find out more here), we are helping our selfs by using AppleScript with a little help of Automator.
(Since we are using AppleScript, this will only work on Mac)

Ill be showing one detailed example with a complete walkthrough and some use cases.

AppleScript

This Script as shown in the video above, will open the “iZotope RX 5 De-crackle” AudioSuite window if not already open (this is represented by the if/else Routine), and hit the “Render”-Button.

Note: The AudioSweet Plugin will open with its default values. So make sure you set your go-to- preset to the factory default setting.

tell application "System Events"
tell process "Pro Tools"
set frontmost to true
if exists (window "Audio Suite: iZotope RX 5 De-crackle") then click button "Render" of window "Audio Suite: iZotope RX 5 De-crackle"
else
click menu item "iZotope RX 5 De-crackle" of menu of menu item "iZotope, Inc." of menu "AudioSuite" of menu bar 1 click button "Render" of window "Audio Suite: iZotope RX 5 De-crackle"
end if
end tell
end tell

Automator

To run the AppleScript will be using the macOS/OS X build in Automator App which is capable to create and run Services.
Creating a Service, open the Automator App, choose “Service” as your wanted type of document. Set the “Service receives” to “no input” in the dropdown menu (will be using a shortcut) and set the “in” to “Pro Tools” so the service will only be visible in the Pro Tools Applications.

Add the actions “Run AppleScript” and enter the Script to the Action. All should look now like this:

Save it and give it a name.

 

Accessibility Control

To let Automator and Pro Tools control other applications we have to go to the

System Preferences / Security & Privacy / Privacy / Accessibility /

and add the Automator App to the “Allow the apps below to control your computer.” and check the checkbox.

Shortcut

Using a keyboard shortcut to run the Script will have to go to

System Preferences / Keyboard / Shortcuts / Services /

here will be able to see our newly created service and give it a shortcut
Note: Use only shortcut which are not used by Pro Tools. I Recommend using the F13 to F19 Keys.

Pro Tools | AppleScript

As you can see using AppleScript and Automator to create shortcuts and even macros for Pro Tools which are missing out is a helpful and powerful tool (especially for mouse only commands).

Some other use cases:

If you’r looking out further into creating your own AppleScript the “Accessibility Inspector“ which comes with Xcode will be a helpful tool. It allows to inspect UI elements.

Note: The shown example are all for Pro Tools 11 and above. Pro Tools 10 is using Number instead of Names for the Buttons.

BTW: featured as a Community Tip at Pro Tools Expert 🙂

If you have any questions feel free to leave a comment.

10 Replies to “Pro Tools | AppleScript”

  1. Hallo Richard,
    vielen Dank für diesen unglaublich hilfreiche Tip und die gute Anleitung! Ich habe mir analog dazu einige Shortcuts basteln können. Das wird mir hochgerechnet einige Wochen Arbeit und mehrere Kilometer Mausbewegung ersparen. Eine Frage hätte ich noch. Hast Du irgendeinen Weg gefunden, die Ausführung des Scripts zu beschleunigen? Im Moment dauert es bei mir ca. anderthalb Sekunden, bis der Befehl ausgeführt wird.
    Herzliche Grüße, und noch mal vielen Dank!
    Karl Atteln

    1. Hallo Karl,

      ich kann leider zu den anderthalb Sekunden Verzögerungen wenig sagen.
      An den von mir getesteten Systeme treten kaum merkbare Latenzen auf (Die Videos zeigen das ausführen der Befehle in echt-zeit).
      Einflussfaktoren können natürlich OS Version, die Performance des Systems und natürlich die Auslastung des Systems darstellen.

      Gruß Richard

  2. Hello, very interesting. I’m not very good in script writing. Could you please tell me how to write the script for rx 6 connect send/render? I’m using it a lot in post production and it would be more than useful. Cheers. Michov

  3. Hi Michov,

    it should basically look like this:

    tell application “System Events”
    tell process “Pro Tools”
    set frontmost to true
    if exists (window “Audio Suite: iZotope RX 6 Connect”) then
    click button “Analyze” of window “Audio Suite: iZotope RX 6 Connect”
    else
    click menu item “iZotope RX 6 Connect” of menu of menu item “iZotope, Inc.” of menu “AudioSuite” of menu bar 1
    click button “Analyze” of window “Audio Suite: iZotope RX 6 Connect”
    end if
    end tell
    end tell

    Unfortunately RX 5 Audio Editor is blocking OS X Service (can’t tell for RX 6 Audio Editor).
    Otherwise it would be possible to make the Send&Returen-Routin a two click workflow.
    So far you have to hit cmd+return in RX Audio Editor to send back to Pro Tools, here you can use the same script insted of “Analyze” use “Render”.

    Cheers
    Richard

    1. Thanks a lot Richard! It’s finally working. You can’t imagine how much time i’m gonna save thanks to you.
      Keep on like this
      Cheers
      Michov

  4. I’ve been trying my very best, but i just caant write a code, to make a shortcut for Write Automation to Selection from the Automation Panel.. That would really up my workflow if that was possible? Thanks very much for this tutorial btw!

    1. Hi Emil,

      sorry for the late reply had some busy weeks.
      For the script, this should work:

      tell application “Pro Tools”
      tell application “System Events”
      click button 11 of window “” of application process “Pro Tools”
      end tell
      end tell

      You can try the “Inspector”-App from the Xcode Bundle, it can show you the Name or Nr. of UI-Elemtents like Buttons.

      Cheers
      Richard

  5. Can you tell me how to write one for the “iZotope RX 6 De-click” render button?
    I’m running PT 12 Version 2018.3.0 on OS Sierra

    Thank you!
    Louie

  6. Hey Louie,

    The following should work to click the render button for any AudioSuite plugin window:

    tell application “System Events”
    tell process “Pro Tools”
    if exists (1st window whose name contains “AudioSuite”) then
    tell (1st window whose name contains “AudioSuite”)
    click button “Render”
    end tell
    else if exists (1st window whose name contains “Audio Suite”) then
    tell (1st window whose name contains “Audio Suite”)
    click button “Render”
    end tell
    else
    display dialog “Error: Window Not Found. Please open and AudioSuite window and try again”
    end if
    activate
    end tell
    end tell

    Hope this helps

    Jon

  7. Hello
    Thank you for your great value post !!!
    It seems that i can’t write a code either… What I would need is this :
    Command-click on the preview button in the automation panel.
    Can you write it for me please ?
    Thank you.

Leave a Reply

Your email address will not be published.