Use this script:
function getMenuAtMousePosition() {
var mp = sf.mouse.getPosition().position;
var element = sf.ui.root.getElementAtPosition(mp.x, mp.y);
while (element.role == 'AXMenuItem') {
element = element.getParentElement();
}
if (element.fullRole == 'AXMenu' || element.fullRole == 'AXWindow:AXDialog')
return element;
return null;
}
var menu = getMenuAtMousePosition();
if (menu) {
menu.getMenuItem('search...').elementClick();
}
else sf.keyboard.press({ keys: 'tab' }); //Fall-through
And assign TAB to it in Pro Tools:

Note, this requires 2.2.0-preview.1.3 or newer
Linked from:
- In reply tochrscheuer⬆:Christian Scheuer @chrscheuer2019-01-02 00:17:26.175Z
Solution is in the post.
- EIn reply tochrscheuer⬆:@Eytan
Hi, I get this error when trying this script:
"javascript exception type error"Christian Scheuer @chrscheuer2019-01-17 09:05:42.031Z
Hi @Eytan. Which SF version are you using?
Christian Scheuer @chrscheuer2019-01-17 09:18:13.276Z
Thanks, I thought so. Please check the link I put up earlier in the thread - as I note in the bottom of the post you need the preview version installed for this to work.
Sorry but the link doesn't work.
Do I actually need to downgrade my version for it to work? Won't I lose something from the latest version?Christian Scheuer @chrscheuer2019-01-17 09:25:10.752Z
2.2.0-preview.1.3 is newer than 2.1.1 :) We're following standard semver versioning schemes. 2.2.0 > 2.1.1.
Here's an updated link: 2.2.0 Preview 1.3
You're right of course... Didn't read it correctly. I updated and now it works!
ThanksChristian Scheuer @chrscheuer2019-01-17 10:15:15.995Z
Awesome! Thanks for reporting back.
- EIn reply tochrscheuer⬆:@Eytan
Hi,
I'm afraid this script doesn't work since I've updated to PT 2019.5.0.
Can someone fix that?
Thanks - TIn reply tochrscheuer⬆:Tom Mochiach @Tom_Mochiach
Like this?
i have no idear how to do it
Christian Scheuer @chrscheuer2022-03-27 09:14:37.334Z
Hi Tom,
What's the version of SoundFlow you're running here? That looks very, very, very old.
Edit: The first step you should take is to download the newest installer, 5.0.11. We don't support those older versions of SF anymore. Not sure why the auto-update hasn't brought you up to speed yet.- TTom Mochiach @Tom_Mochiach
5.0.12 now
Still the sameChristian Scheuer @chrscheuer2022-03-27 13:50:25.527Z
Your copied version of the script is not equivalent to what's in the original post here - you've got some kind of copy/paste error from what I can tell (you've got additional content on the last line)
Christian Scheuer @chrscheuer2022-03-27 13:51:16.834Z
Also, be sure to check this video which shows some more options for workarounds:
- TTom Mochiach @Tom_Mochiach
It works, you are right
Thank you very much
I’m enjoying the automated stream deck using SoundFlow so much that it was strange to look at the plug ins menu today.
It is so flowing using set in advance buttons for pluggins !