No internet connection
  1. Home
  2. How to

Toolbar Option menu button

By Thomas Gloor @Thomas_Gloor
    2024-06-21 10:03:23.400Z

    Hi everyone,

    I've updated PT today and as expected, some scripts are acting up.

    I have a script which gathers the pro tools view options, and it doesn't seem to find the popupmenu window for the toolbar.

    Here is how it's called in my script
    const popupMenuWin = sf.ui.proTools.windows.whoseTitle.is("Menu 19 items, Zoom Controls").first;

    Is there another way to call it to solve the issue?

    Thank you!

    • 9 replies
    1. Which window are you referring to in that line of code?

      1. In reply toThomas_Gloor:

        Never mind, I found it. It's the top right popup in the edit window for views.
        This should be compatible with 2024.6 and earlier:
        const popupMenuWin = sf.ui.proTools.windows.whoseTitle.contains("Zoom Controls").first

        1. TThomas Gloor @Thomas_Gloor
            2024-06-21 16:49:11.147Z

            And that did the trick.

            Thank you very much!

            1. In reply toChris_Shaw:
              TThomas Gloor @Thomas_Gloor
                2024-06-22 12:13:03.051Z

                I’ll post my script on the forum.

                It basically takes all display settings and stores them into a JSON and another script recalls the settings.

                Waiting to add a way of recalling different settings,
                Like the preference manager app!
                Like one for mixing, editing, recording…

                1. Storing and recalling different settings is relatively easy.

                  1. TThomas Gloor @Thomas_Gloor
                      2024-06-22 13:46:31.500Z

                      I know!
                      I just never took the time to do it!

                      1. In reply toChris_Shaw:
                        TThomas Gloor @Thomas_Gloor
                          2024-06-22 16:22:03.126Z

                          Would you go for different keyboard modifiers to pick presets? Or do you have another idea?
                          I don’t like lists, as I prefer to have an automatic default.
                          A keyboard modifier could call a list though…

                          1. Personally I'd use a searchable list via:sf.interaction.popupSearch().
                            The popup search is really powerful - you only need to type a couple of letters to get results.
                            Another option would be to use a SD button / keyboard trigger to call your most used preset and have a secondary modifier for the same trigger / button that would call up a searchable list for lesser used presets.
                            If you're not storing a ton of presets you could prepend each preset name with a single or double digit number so searching the list / selecting a preset would be easier

                            1. TThomas Gloor @Thomas_Gloor
                                2024-06-22 19:05:41.871Z

                                Oh! Good idea about “pop up search”
                                I was thinking about the one that display list items (the name eludes me now).

                                Thank you for your input Chris!