No internet connection
  1. Home
  2. Ideas

Pro Tools 2024.6 Redesigned clip search and SF auto-bypass

By Vladimir @poterukha
    2024-06-21 03:40:26.831Z

    Hey everybody,

    In Pro Tools 24.6, Avid has redesigned a clip search, and we no longer have a pop-up find window blocking the main edit window. Now, when I search for clips, I must bypass SF to not trigger any single-key Pro Tools shortcuts.

    Is there a smart way to detect if the user has an edit cursor in the find field in the Clip List?

    • 12 replies
    1. Danny @Danny_van_Spreuwel
        2024-06-24 09:25:30.546Z

        Same here. I think it would be a solution to have the "ignore when typing text" in this field active. Not sure why this option doesn't work here. Same when typing in the comment field. Must be a Pro Tools system thing.

        1. P
          In reply topoterukha:
          Pierre van Caloen @Pierre_van_Caloen
            2024-08-23 14:54:53.369Z

            Hi all,

            Anyone found news or workaround for this?

            Thanks,
            Pierre

            1. In reply topoterukha:
              aliambere @aliambere
                2024-09-05 09:14:39.514Z

                To detect if the edit cursor is in the find field in the Clip List in Pro Tools 24.6, you can use a script or custom function that checks the focus of the current field. Unfortunately, Pro Tools doesn’t provide a direct API for this, but you might be able to work around it by monitoring focus changes or using scripting tools that interact with the Pro Tools UI.

                1. Dustin Harris @Dustin_Harris
                    2024-10-02 17:05:02.954Z

                    I wonder if we can use the search bar element properties (.exists, .isSelected, .isVisible) to set a wait condition which should tie up the sf automation cue…

                  • P
                    In reply topoterukha:
                    Pierre van Caloen @Pierre_van_Caloen
                      2024-10-02 10:48:35.065Z

                      Still no solution in the update.
                      Meanwhile I've added a macro with cmd-shift-f trigger that activates the same keystroke and then just waits for 5000 ms.
                      Works 90% of the time...

                      1. Danny @Danny_van_Spreuwel
                          2024-10-02 16:21:10.216Z

                          Hey Pierre, does the wiring means that Sound Flow is inactive in those 5 seconds?

                        • O
                          In reply topoterukha:

                          Hi I'm not in 2024 so I'm not actually sure if this works, but it could be adapted easily. I'll be updating to 2024 in the next couple weeks and will cirlce back if no one else has...

                          Basically I built this a while back for someone who's session was so huge they just wanted to be able to type the whole search before filtering. So instead of searching in the find box it first displays a SoundFlow Dialog that you type your search into and then it runs the find and fills text.

                          function main() {
                              // Activate Main Window
                              sf.ui.proTools.appActivateMainWindow()
                          
                              // Enter Search Text Desired
                              let searchText = sf.interaction.displayDialog({
                                  title: "Search",
                                  prompt: "Search Term",
                                  defaultAnswer: ""
                              }).text
                          
                              // Get current state of Clip view
                              const isClipListEnabled = sf.ui.proTools.getMenuItem("View", "Other Displays", "Clip List").isMenuChecked
                          
                              // Open Clip List if It's not
                              if (!isClipListEnabled) {
                                  sf.ui.proTools.menuClick({
                                      menuPath: ["View", "Other Displays", "Clip List"],
                                  });
                              }
                          
                              // Click Clip Menu Item Find
                              sf.ui.proTools.mainWindow.popupButtons.whoseTitle.is('Clip List').first.popupMenuSelect({
                                  menuPath: ['Find...']
                              });
                          
                              //Define Find Window
                              const findWin = sf.ui.proTools.windows.whoseTitle.is("Find Clips").first
                          
                              //Wait For Find Window
                              findWin.elementWaitFor();
                          
                              //Enter Value to Find Window
                              findWin.textFields.first.elementSetTextFieldWithAreaValue({
                                  value: searchText,
                              });
                          
                              //Press OK on Find
                              findWin.buttons.whoseTitle.is("OK").first.elementClick();
                          }
                          
                          main()
                          

                          Down side is... it doesn't do the real time filtering as you type. Also likely you'll need to change line 22-39 to focus the new 2024 field instead of the old search window. If no one else takes it on, I'll circle back here when I've installed 2024 and do an update.

                          Good luck,
                          Owen

                          1. Dustin Harris @Dustin_Harris
                              2024-10-03 00:23:10.128Z2024-10-03 00:31:06.526Z

                              Try this, it should 'wait' until the search field is no longer focused for SF to start accepting commands again.

                              function main() {
                              
                                  sf.ui.proTools.appActivateMainWindow();
                              
                                  sf.ui.proTools.mainWindow.textFields.first.elementClick();
                              
                                  while (sf.ui.proTools.mainWindow.textFields.first.invalidate().isFocused) {
                                      sf.wait({ intervalMs: 100 })
                                  }
                              
                              }
                              
                              main();
                              
                              1. Dustin Harris @Dustin_Harris
                                  2024-10-03 00:26:37.261Z

                                  Downside to this is you have to assign it a quick key so it triggers the script (which sets the cursor in the search box), it won't work with manual point and click

                                  1. That seems MUCH more elegant. Any of the OP's tested and happy?

                                    1. Danny @Danny_van_Spreuwel
                                        2024-10-14 07:21:59.112Z

                                        Thank you Owen and Dustin. Haven't tested it yet. But it looks promising. Do I understand it correctly that the 13 lines of code from Dustin replaces the 42 lines of code from Owen or do they need to be merged?

                                        1. Nope, just use @Dustin_Harris 's clean code alone. Much much sleeker.