No internet connection
  1. Home
  2. How to

close focused insert window without track selected.

By Daniel Perez @daniel_perez
    2023-08-14 14:31:15.660Z

    the closing window thing in pt is a bit wild. i have my commands for audiosuite windows, but not for inserts. i need a general command for closing insert windows, focused or not. not dependant on which track is selected. not dependant on what insert slot the plugin is on. close insert window, focused or not

    Solved in post #10, click to view
    • 12 replies
    1. Daniel Perez @daniel_perez
        2023-08-14 14:31:56.043Z
        1. Chad Wahlbrink @Chad2023-08-14 14:59:30.856Z

          @daniel_perez - is this a request to close a "named" insert plug-in window? Or are you just wanting to close all insert windows?

          I'm curious if any of the built-in SoundFlow commands in the Pro Tools package are already functional enough for you?


          I typically use SoundFlow's "Close All Floating Windows" command or "Close Focused Floating Window Command," as I'm working. The built-in "Hide All Floating Windows" menu action is also really powerful for window management.

          1. Daniel Perez @daniel_perez
              2023-08-14 15:02:33.121Z

              ah, yes. i don't want to close audiosuite windows. they need to stay opened. preferably any insert, names or not.

              1. Chad Wahlbrink @Chad2023-08-14 15:08:04.317Z

                Let me know if any of these solutions work for you ✨

              2. In reply toChad:
                Chad Wahlbrink @Chad2023-08-14 15:04:54.009Z

                If closing a "named" insert window (only instances of Pro-Q 3 for instance) is desired use this:

                let pluginToClose = `Fabfilter Pro-Q 3`
                
                //Close plug-in windows
                sf.ui.proTools.floatingWindows.whoseTitle.startsWith("Plug-in: " + pluginToClose).allItems.forEach(function (win) {
                    try { win.windowClose(); } catch (err) { }
                });
                
                For AudioSuite:
                let pluginToClose = `Fabfilter Pro-Q 3`
                
                //Close plug-in windows
                sf.ui.proTools.floatingWindows.whoseTitle.startsWith("Audio Suite: " + pluginToClose).allItems.forEach(function (win) {
                    try { win.windowClose(); } catch (err) { }
                });
                
                1. Daniel Perez @daniel_perez
                    2023-08-14 15:49:07.237Z
                    let pluginToClose = `Fabfilter Pro-Q 3`
                    
                    //Close plug-in windows
                    sf.ui.proTools.floatingWindows.whoseTitle.startsWith("Plug-in: " + pluginToClose).allItems.forEach(function (win) {
                        try { win.windowClose(); } catch (err) { }
                    });
                    

                    this one looks great, but is it possible to close focused plugin (insert) window only? i have pro limiter or nugen open (unfocused) for loudness and these ones should not be closed of course.

                    1. Chad Wahlbrink @Chad2023-08-14 15:55:21.570Z

                      @daniel_perez - can you provide more details on what you want a script to do for you? I think what you are saying is that you want to "close all insert windows except pro-limiter or nugen"?

                      If that's the case, I could likely whip up a script that will close all inserts except an array (a named group of plug-ins).

                      1. Daniel Perez @daniel_perez
                          2023-08-14 16:00:02.438Z

                          yes. it's basically this:

                          //Close plug-in windows
                          sf.ui.proTools.floatingWindows.whoseTitle.startsWith('Plug-in').allItems.forEach(function (win) {
                              try { win.windowClose(); } catch (err) { }
                          });
                          

                          but except avid pro limiter.

                          1. Chad Wahlbrink @Chad2023-08-14 19:58:48.753Z
                            // Plugins to Keep Open
                            let pluginsToKeep = [`Plug-in: Pro Limiter`,];
                            
                            // Get Plugin Windows
                            let currentPluginWins = sf.ui.proTools.floatingWindows.whoseTitle.startsWith("Plug-in").allItems;
                            
                            // Filter and Close Plugin Windows
                            let filtered = currentPluginWins.filter(item => !pluginsToKeep.includes(item.title.value));
                            filtered.forEach(function (win) {
                                try { win.windowClose(); } catch (err) { }
                            });
                            
                            1. Chad Wahlbrink @Chad2023-08-14 20:00:30.811Z

                              @daniel_perez - give this a shot. You can add more plugin's to that initial array following this pattern:

                              // Plugins to Keep Open
                              let pluginsToKeep = [`Plug-in: Pro Limiter`, `Plug-in: FabFilter Pro-Q 3`];
                              
                2. In reply todaniel_perez:
                  Nathan Salefski @nathansalefski
                    2023-08-14 18:04:00.197Z

                    This will work. If you have multiple plugin windows open whichever is "focused" will be closed first.

                    var frontPluginWin = sf.ui.proTools.getFloatingWindowWithTitleStartingWith("Plug-in").invalidate();
                    
                    frontPluginWin.windowClose();
                    
                    ReplySolution
                    1. Daniel Perez @daniel_perez
                        2023-10-26 12:55:59.396Z

                        that's just perfect.