Pro Tools Automation scripts

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
rappit4
Posts: 5
Joined: 15 Jan 2023, 14:02

Pro Tools Automation scripts

Post by rappit4 » 06 Dec 2023, 07:54

Hello all!
Been using AHK with Avid Pro Tools for a year now and I'm loving it. My two main functions are Preview enable/disable. And write automation to selection.
I have made it like this:

Code: Select all

#IfWinActive ahk_exe ProTools.exe
CoordMode, Mouse, Screen
+1::
MouseGetPos, xpos, ypos
send ^{numpad4}
sleep 500
MouseClick,Left, 61,1202
MouseMove, xpos, ypos
send {Enter}
sleep 300
send ^{numpad4}

Return
CoordMode, Mouse, Screen
+2::
MouseGetPos, xpos, ypos
send ^{numpad4}
sleep 500
MouseClick,Left, 45,1349
MouseMove, xpos, ypos
sleep 200
send ^{numpad4}
So as you can see my approach was bringing up and hiding the automation window in with ctrl+4 shortcut to a certain spot on the screen and clicking on either preview or write automation to selection button. However its a bit slow and finnicky. Does anyone know of a better way to enable/disable preview mode? And to write automation? Sometimes when I execute the command the CTRL+4 automation window doesnt pop up but the script still completes which can sometime create a mess in my project so its not really reliable.
Thanks for any suggestions.

RussF
Posts: 1292
Joined: 05 Aug 2021, 06:36

Re: Pro Tools Automation scripts

Post by RussF » 06 Dec 2023, 10:08

After you send the Ctrl+Numpad4, instead of using Sleep, use WinWait. You could add a timeout to that command, and use ErrorLevel to see if it timed out - at which point you could choose whether or not to execute the remaining statements.

Russ

rappit4
Posts: 5
Joined: 15 Jan 2023, 14:02

Re: Pro Tools Automation scripts

Post by rappit4 » 07 Dec 2023, 06:16

RussF wrote:
06 Dec 2023, 10:08
After you send the Ctrl+Numpad4, instead of using Sleep, use WinWait. You could add a timeout to that command, and use ErrorLevel to see if it timed out - at which point you could choose whether or not to execute the remaining statements.

Russ
Oh wow thats a cool trick, thank you! Since im using 3 monitor I just got the idea of having the automation window open all the time on the 3rd window and just making a click there, its way faster like this, but I will for sure implement you method in my laptop!
Thank you!

Post Reply

Return to “Ask for Help (v1)”