I've been looking for a way to create shortcuts for a particular window in Pro Tools (the Quantize window in Event Operations, if anyone is familiar). I wrote a couple Applescripts that work in getting the window and a drop down menu open, and it works extremely well and is consistent.
However, I wanted to add a keystroke in the KM macro after the scripts to cycle through some of the items in the drop down menu before pressing Return to select one. When I add the "Type a Keystroke" action after my scripts, the keystroke is delayed, it seems by up to 7 seconds.
Without the Keystroke action, the script runs instantly and the drop down menu is accessed, but adding just the Keystroke action causes the desired action to lag. I tried adding a "key code" command in the script itself, but that is having the same effect. I've also tried running the script in a few other applications (Fastscripts and Script Editor) and I'm getting the same result.
Is there some preference in KM that I'm not aware of that would cause this issue, or could it be with Pro Tools itself? All my other KM macros, some of which have up to 20 keystrokes, don't have this lag at all and execute immediately. It seems there is something about having a keystroke after a script that causes something (KM, Pro Tools?) to lag for a few seconds.
I'm running a Mac Pro 5,1 2 x 2.66 GHz OSX 10.12.6, Keyboard Maestro v8.2.4