No internet connection
  1. Home
  2. How to

How to work around the PT legacy menu not supporting Tab to search.

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

Solved in post #2, click to view
  • 17 replies
  1. In reply tochrscheuer:

    Solution is in the post.

    1. E
      In reply tochrscheuer:
      @Eytan
        2019-01-17 08:46:36.288Z

        Hi, I get this error when trying this script:
        "javascript exception type error"

        1. Hi @Eytan. Which SF version are you using?

          1. E@Eytan
              2019-01-17 09:17:21.422Z

              Version 2.1.1 (2.1.1)

              1. 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.

                1. E@Eytan
                    2019-01-17 09:22:22.303Z

                    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?

                    1. 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

                      1. E@Eytan
                          2019-01-17 10:14:39.343Z

                          You're right of course... Didn't read it correctly. I updated and now it works!
                          Thanks

                          1. Awesome! Thanks for reporting back.

              2. E
                In reply tochrscheuer:
                @Eytan
                  2019-06-08 11:50:53.707Z

                  Hi,
                  I'm afraid this script doesn't work since I've updated to PT 2019.5.0.
                  Can someone fix that?
                  Thanks

                  1. T
                    In reply tochrscheuer:
                    Tom Mochiach @Tom_Mochiach
                      2022-03-26 18:56:37.897Z

                      Like this?

                      i have no idear how to do it

                      1. 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.

                        1. TTom Mochiach @Tom_Mochiach
                            2022-03-27 13:32:07.652Z

                            5.0.12 now
                            Still the same

                            1. 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)

                              1. Also, be sure to check this video which shows some more options for workarounds:

                                1. TTom Mochiach @Tom_Mochiach
                                    2022-03-28 12:47:41.598Z

                                    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 !