No internet connection
  1. Home
  2. How to

FabFilter ProQ3 disable band

By Chris Testa @Chris_Testa
    2024-10-16 04:25:11.923Z

    I've seen the script to show the automation lane of an automated parameter of FFProQ3 but is there any way to just "Enable" or "Disable" a specific band? I have all my ProQ3 IQs on Insert 3. I have a lot of preset eq points that are set and I'd like to be able to one touch them on and off and write them to automation. So, open, select "Preview", disable/ enable a specified band and Write to Selection. I might be thinking about how to do it the wrong way but I can't figure it out.

    • 42 replies

    There are 42 replies. Estimated reading time: 28 minutes

    1. This can be a bit complex because each band of a Fab Filter eq has 13 parameters. Are you looking just to toggle the "Band # Enable" parameter?

      1. CChris Testa @Chris_Testa
          2024-10-16 17:01:49.956Z

          Yes. So for post I get a lot of lav mic's that constantly need to be eq in a similar way, either pulling out some 160 ish or boosting some top end. So I have a lot of preset eq points that are set but disabled. So ideally I would love to have a button to write it on or write it off. So yes, just toggle on and off the band "Enable" parameter. I'm assuming if it was on hitting "Enable" would "Disable" it and vice versa. Does that all make sense? I think if I could get one script then I can duplicate and change for different bands.

          1. Chris Shaw @Chris_Shaw2024-10-16 19:53:20.440Z2024-10-16 20:59:58.998Z

            Something like this should do it.

            const bandNumbersToToggle = ["1", "2", "6"];
            const proQInsertNumber = 3
            
            sf.ui.proTools.appActivateMainWindow();
            sf.ui.proTools.mainWindow.invalidate();
            
            //Get PT UI Elements
            const selectedTrack = sf.ui.proTools.selectedTrack;
            selectedTrack.trackScrollToView();
            const proQInsertSelectorBtn = selectedTrack.insertSelectorButtons[proQInsertNumber - 1];
            const proQInsertBtn = selectedTrack.insertButtons[proQInsertNumber - 1];
            
            // Ensure automation window is open
            sf.ui.proTools.automationWindowRequireOpenAutomationWindow();
            const autoMationWin = sf.ui.proTools.automationWindow;
            autoMationWin.elementRaise();
            
            //Ensure Preview is on
            const prevBtn = autoMationWin.previewButton;
            const prevState = prevBtn.value.invalidate().value;
            if (prevState !== "Selected") { prevBtn.elementClick() }
            
            //Ensure Pro- Q window is open
            const isProQOpen = proQInsertSelectorBtn.value.invalidate().value.startsWith("open");
            
            if (!isProQOpen) {
                proQInsertBtn.elementClick();
                const proQWin = sf.ui.proTools.windows.whoseTitle.startsWith("Plug-in: FabFilter Pro-Q").first;
                proQWin.elementWaitFor()
            };
            
            // Get Pro-Q elements
            const proQWindow = sf.ui.proTools.windows.whoseTitle.is("Plug-in: FabFilter Pro-Q 3").first;
            const proQEditView = proQWindow.groups.whoseTitle.is("FXTDMEditView").first;
            
            //Toggle Pro-Q Bands
            let bandEnableAction
            bandNumbersToToggle.forEach((band, index) => {
                const bandParameter = `Band ${band} Enabled`;
                if (index == 0) {
                    const isProQBandEnabled = Boolean(proQEditView.children.whoseTitle.is(bandParameter)[0].value.intValue);
            
                    bandEnableAction = isProQBandEnabled ? "AXDecrement" : "AXIncrement";
                }
            
                proQEditView.children.whoseTitle.is(bandParameter)[0].elementClick({
                    actionName: bandEnableAction
                })
            })
            
            // Write automation to selection
            const writeSelectionBtn = autoMationWin.buttons.whoseTitle.is("Write Automation to Selection").first;
            
            writeSelectionBtn.elementClick({ asyncSwallow: true })
            sf.wait({ intervalMs: 150 })
            
            // Close Conf window
            const confWin = sf.ui.proTools.confirmationDialog;
            
            const confWinExists = confWin.elementWaitFor({
                onError: "Continue",
                timeout: 75
            }).success;
            
            if (confWinExists) {
                sf.waitFor({
                    callback: () => confWin.buttons.whoseTitle.is("OK").first.exists,
                    onError: "Continue",
                })
                let confBtn = confWin.buttons.whoseTitle.is("OK").first;
                if (confBtn.exists) confBtn.elementClick();
            }
            
            // Turn off preview
            prevBtn.elementClick();
            
            //Close automation window
            autoMationWin.windowClose()
            autoMationWin.elementWaitFor({ waitType: "Disappear" })
            
            // Inform user of band enabled state
            const newToggleState = bandEnableAction == "AXIncrement" ? "enabled" : "disabled";
            const toggledBands = bandNumbersToToggle.join(`, `)
            
            sf.interaction.notify({
                title: "Pro-Q3",
                message: `Bands ${toggledBands} are ${newToggleState}`,
                keepAliveMs: 750
            })
            

            Change the first two constants as needed. The bandNumbersToToggle array should be an array of strings not numbers.

            The plugin window has to be open in order to toggle the bands so the script insures that it's open on the selected track.
            The script will look at the state of the first band's enabled state and toggle it and the remaining bands to the same enable/disabled state.

            1. The proQInsertNumber value should be 1-10.

              1. In reply toChris_Shaw:

                This script assumes:

                • the selected track's automation mode is set to "write", "latch" etc
                • Insert are visible in the edit window
                • The bands being toggled have their Band Enabled parameter set to be automated
                1. CChris Testa @Chris_Testa
                    2024-10-16 20:01:52.240Z

                    ok. I think I got it. Let me try. Dude you rock. And just on a side note, "Love and Theft" and still one of my favorite sounding records. :)

                    1. Thanks!

                    2. In reply toChris_Shaw:
                      CChris Testa @Chris_Testa
                        2024-10-16 20:11:59.264Z

                        So it fully works. Thank you. It writes the move super quick which is great but it does leave Preview on and give me this error... not sure why.

                        1. CChris Testa @Chris_Testa
                            2024-10-16 20:13:12.024Z

                            ProQ3 is open and my automation window is open as well.

                            1. Do you want automation and proQ windows closed at the end of the script?

                            2. In reply toChris_Testa:

                              I added an error check in the code above.
                              Give it a try.

                              1. CChris Testa @Chris_Testa
                                  2024-10-16 20:20:48.798Z

                                  same thing. Like I said it does work. I never see the automation Capture button light up but it is writing the move. Still getting the exact same error and automation window still stays in Preview.

                                  1. Ahh, I have this turned off:

                                    I've updated the code above to account for it being either on or off
                                    1. CChris Testa @Chris_Testa
                                        2024-10-16 20:34:26.145Z

                                        Right. I wouldn't have thought of that. So still the same thing. Same error but on a different line? Also, I don't need the plug in to disappear. I usually have it up because I'm checking output level on the ProQ meter. But still same thing. Is there anything I can check or do? I hate taking up your time.

                                        1. I've tweaked the code above again.
                                          Just to be sure reload this web page to make sure the code is updated.
                                          IF it fails again I'll need the line # from the error message in addition to which version of PT and SF you're running.

                                          1. CChris Testa @Chris_Testa
                                              2024-10-16 20:48:54.808Z

                                              Yes. I am refreshing the page each time. I'm running PT 2024.3.1. I'm not getting a line error now but I am getting this "message" now. I was always getting a line error before. Now I am not. It is writing the move but automation is still stuck in Preview after it is done, also the automation window is disappearing and that can stay up as well. So basically still the same thing, writing but staying in Preview.

                                              1. CChris Testa @Chris_Testa
                                                  2024-10-16 20:49:43.405Z

                                                  And I get this message after the script runs so it's almost like it's confirming that it's done (I switched the script to just do Band 3 FYI)

                                                  1. That message at the end is intentional. I just confirms what you've done in case the Enable automation lane isn't visible or the script runs too fast to see what happens. I've shortened it to 1 second. The default is 2 seconds - feel free to change it. It's the keepAlive property at the bottom:

                                                    sf.interaction.notify({
                                                        title: "Pro-Q3",
                                                        message: `Bands ${toggledBands} are ${newToggleState}`,
                                                        keepAliveMs: 750
                                                    })
                                                    

                                                    Or you can delete the whole thing if yo don't want the message (the last five lines of the script from sf.interaction.notify{ onward).

                                                    The above edited script should now do it.

                                                    1. CChris Testa @Chris_Testa
                                                        2024-10-16 21:09:56.401Z

                                                        DONE. Nice. Thank again. You f'in rock.

                                                        1. In reply toChris_Shaw:
                                                          CChris Testa @Chris_Testa
                                                            2024-10-30 20:08:59.022Z

                                                            Thanks again for this Chris. Saving me a ton of time. I set it up for all bands and man it's really speeding things up. Thank you.

                                                            1. Glad that it’s working for you.

                                                              1. CChris Testa @Chris_Testa
                                                                  2024-11-01 21:40:33.111Z

                                                                  Hey Chris, I almost hate to say this but I've updated to 2024.10 and now this doesn't work. Is it something small that can be tweaked? I don't get an error it just does "something" but nothing with the plug in.

                                                                  1. I’m away until Monday.
                                                                    I’ll take a look then.

                                                                    1. CChris Testa @Chris_Testa
                                                                        2024-11-01 23:11:00.789Z

                                                                        No rush at all. Thank you again.

                                                                        1. In reply toChris_Shaw:
                                                                          CChris Testa @Chris_Testa
                                                                            2024-11-02 16:35:45.753Z

                                                                            Hey Chris, don't worry about it. I moved back to 2024.3. 2024.6 and 2024.10 have been a bit buggy and sluggish for me so I'm gonna stay with this version for awhile. thanks again. c

                                                                          • In reply toChris_Testa:

                                                                            It seems to be working on my end w/ 2024.10 but if you switch back to 2024.10 let me know and we'll figure it out.

                                                                            1. CChris Testa @Chris_Testa
                                                                                2024-11-04 20:03:56.797Z

                                                                                ok thanks and will do.

                                                    2. In reply toChris_Shaw:
                                                      Ddanielkassulke @danielkassulke
                                                        2025-01-04 07:34:35.461Z

                                                        Hi Chris,

                                                        Chiming in late like a greedy pig - but I'm wondering if this would take much graft to translate to ProMB if you haven't already? I break the frequency spectrum into 6 bands, and will solo them for a sanity check while mixing. Happy to tackle myself if not!

                                                  2. C
                                                    In reply toChris_Testa:
                                                    Chris Testa @Chris_Testa
                                                      2024-12-31 20:15:41.652Z

                                                      Hey Chris, checking back in on this one. I made the update to ProQ4 and to PR 2024.10.1. I tried to change a few things to fix but of course, not really knowing, it doesn't work. If you get time to look at it I would appreciate it. thank you. c

                                                      1. TTristan Hoogland @Tristan
                                                          2025-01-04 06:38:05.116Z

                                                          I think if you just amend the proQWindow line from:

                                                          const proQWindow = sf.ui.proTools.windows.whoseTitle.is("Plug-in: FabFilter Pro-Q3").first;
                                                          

                                                          to

                                                          const proQWindow = sf.ui.proTools.windows.whoseTitle.startsWith("Plug-in: FabFilter Pro-Q").first;
                                                          

                                                          it should work and actually make it backwards compatible so that even if it's Pro-Q3 or Pro-Q4 it'll do whatever is in insert slot C.

                                                          Cool code @Chris_Shaw !

                                                          const bandNumbersToToggle = ["1", "2", "6"];
                                                          const proQInsertNumber = 3
                                                          
                                                          sf.ui.proTools.appActivateMainWindow();
                                                          sf.ui.proTools.mainWindow.invalidate();
                                                          
                                                          //Get PT UI Elements
                                                          const selectedTrack = sf.ui.proTools.selectedTrack;
                                                          selectedTrack.trackScrollToView();
                                                          const proQInsertSelectorBtn = selectedTrack.insertSelectorButtons[proQInsertNumber - 1];
                                                          const proQInsertBtn = selectedTrack.insertButtons[proQInsertNumber - 1];
                                                          
                                                          // Ensure automation window is open
                                                          sf.ui.proTools.automationWindowRequireOpenAutomationWindow();
                                                          const autoMationWin = sf.ui.proTools.automationWindow;
                                                          autoMationWin.elementRaise();
                                                          
                                                          //Ensure Preview is on
                                                          const prevBtn = autoMationWin.previewButton;
                                                          const prevState = prevBtn.value.invalidate().value;
                                                          if (prevState !== "Selected") { prevBtn.elementClick() }
                                                          
                                                          //Ensure Pro- Q window is open
                                                          const isProQOpen = proQInsertSelectorBtn.value.invalidate().value.startsWith("open");
                                                          
                                                          if (!isProQOpen) {
                                                              proQInsertBtn.elementClick();
                                                              const proQWin = sf.ui.proTools.windows.whoseTitle.startsWith("Plug-in: FabFilter Pro-Q").first;
                                                              proQWin.elementWaitFor()
                                                          };
                                                          
                                                          // Get Pro-Q elements
                                                          const proQWindow = sf.ui.proTools.windows.whoseTitle.startsWith("Plug-in: FabFilter Pro-Q").first;
                                                          const proQEditView = proQWindow.groups.whoseTitle.is("FXTDMEditView").first;
                                                          
                                                          //Toggle Pro-Q Bands
                                                          let bandEnableAction
                                                          bandNumbersToToggle.forEach((band, index) => {
                                                              const bandParameter = `Band ${band} Enabled`;
                                                              if (index == 0) {
                                                                  const isProQBandEnabled = Boolean(proQEditView.children.whoseTitle.is(bandParameter)[0].value.intValue);
                                                          
                                                                  bandEnableAction = isProQBandEnabled ? "AXDecrement" : "AXIncrement";
                                                              }
                                                          
                                                              proQEditView.children.whoseTitle.is(bandParameter)[0].elementClick({
                                                                  actionName: bandEnableAction
                                                              })
                                                          })
                                                          
                                                          // Write automation to selection
                                                          const writeSelectionBtn = autoMationWin.buttons.whoseTitle.is("Write Automation to Selection").first;
                                                          
                                                          writeSelectionBtn.elementClick({ asyncSwallow: true })
                                                          sf.wait({ intervalMs: 150 })
                                                          
                                                          // Close Conf window
                                                          const confWin = sf.ui.proTools.confirmationDialog;
                                                          
                                                          const confWinExists = confWin.elementWaitFor({
                                                              onError: "Continue",
                                                              timeout: 75
                                                          }).success;
                                                          
                                                          if (confWinExists) {
                                                              sf.waitFor({
                                                                  callback: () => confWin.buttons.whoseTitle.is("OK").first.exists,
                                                                  onError: "Continue",
                                                              })
                                                              let confBtn = confWin.buttons.whoseTitle.is("OK").first;
                                                              if (confBtn.exists) confBtn.elementClick();
                                                          }
                                                          
                                                          // Turn off preview
                                                          prevBtn.elementClick();
                                                          
                                                          //Close automation window
                                                          autoMationWin.windowClose()
                                                          autoMationWin.elementWaitFor({ waitType: "Disappear" })
                                                          
                                                          // Inform user of band enabled state
                                                          const newToggleState = bandEnableAction == "AXIncrement" ? "enabled" : "disabled";
                                                          const toggledBands = bandNumbersToToggle.join(`, `)
                                                          
                                                          sf.interaction.notify({
                                                              title: "Pro-Q",
                                                              message: `Bands ${toggledBands} are ${newToggleState}`,
                                                              keepAliveMs: 750
                                                          })
                                                          
                                                          1. CChris Testa @Chris_Testa
                                                              2025-01-04 23:03:50.315Z

                                                              Yeah I tried that. It doesn't work for me on 2024.10 for some reason. I copied pasted this in as well and got the same result. Not working yet.

                                                              1. TTristan Hoogland @Tristan
                                                                  2025-01-05 00:22:04.697Z

                                                                  On a brand new installed PT system here 2024.10.1 it's working straight off the bat here, so I'm assuming there's something in your preferences that's failing it. Are you able to provide the log error and or a video of it happening? Whatever it's going to be, it'll be really simple.

                                                                  1. CChris Testa @Chris_Testa
                                                                      2025-01-05 18:23:47.647Z

                                                                      I got it working. My bad. I redid some things in my template and I thought I kept the eq on the same insert but I did change. thanks again for the help.

                                                                • In reply toChris_Testa:

                                                                  Sorry that I didn't see his when you originally posted. Things were a bit crazy on my end with the holidays.
                                                                  Glad you and @Tristan worked it out.

                                                                  1. CChris Testa @Chris_Testa4
                                                                      2025-01-05 20:42:27.180Z

                                                                      Totally. I knew you initially built it in 2024.10 so I figured it was something simple. Thanks a bunch and Happy New Year.

                                                                      1. In reply toChris_Shaw:
                                                                        CChris Testa @Chris_Testa
                                                                          2025-01-06 00:16:30.773Z

                                                                          So I got everything fully working the way I want but I did add 3 more bands. So I have bands 1-7 that I want to use but only 1-4 are working. Is that because of the code? When I select 5-7 they all just turn band 4 on and off. Any thoughts? thanks

                                                                          1. Seems to be working fine on my setup.
                                                                            Do you have the band Enable automation turned on for all of the bands like this?:

                                                                            And the first line of the scrip is:
                                                                            const bandNumbersToToggle = ["1", "2", "3","4","5","6","7"];

                                                                            1. CChris Testa @Chris_Testa
                                                                                2025-01-06 20:22:44.976Z

                                                                                Yeah. I have all parameters of the first ten bands enabled for my ProQ4. (I also updated to ProQ4 if that makes any difference.) I have copy pasted that code into 7 different buttons that correspond to each band and I've changed the band number at the top of the script (see below). Double checked my prefs and the scripts and everything seems to be good so I don't know why once I get to bands 5, 6, and 7 they just wind up enabling/ disabling only band 4.

                                                                                1. CChris Testa @Chris_Testa
                                                                                    2025-01-06 20:23:38.606Z

                                                                                    I can send you a picture or a video if that would help. Also I can send the script I'm just never sure how to send that. thanks.

                                                                                    1. CChris Testa @Chris_Testa
                                                                                        2025-01-08 19:18:25.802Z

                                                                                        Hey Chris, any thoughts on this?

                                                                                        1. Everything seems to be working here.
                                                                                          I've refactored a couple of lines of code (none of which effects or addresses you problem).
                                                                                          On the odd chance that you may have copied something incorrectly here's the whole script again. I've set the band to 10 on the second line.
                                                                                          (FYI - here's how you post code on the forum: How to quote code in the SoundFlow forum.)

                                                                                          // const bandNumbersToToggle = ["1", "2", "3","4","5","6","7"];
                                                                                          const bandNumbersToToggle = ["10"];
                                                                                          const proQInsertNumber = 3
                                                                                          
                                                                                          sf.ui.proTools.appActivateMainWindow();
                                                                                          sf.ui.proTools.mainWindow.invalidate();
                                                                                          
                                                                                          //Get PT UI Elements
                                                                                          const selectedTrack = sf.ui.proTools.selectedTrack;
                                                                                          selectedTrack.trackScrollToView();
                                                                                          const proQInsertSelectorBtn = selectedTrack.insertSelectorButtons[proQInsertNumber - 1];
                                                                                          const proQInsertBtn = selectedTrack.insertButtons[proQInsertNumber - 1];
                                                                                          
                                                                                          // Ensure automation window is open
                                                                                          sf.ui.proTools.automationWindowRequireOpenAutomationWindow();
                                                                                          const autoMationWin = sf.ui.proTools.automationWindow;
                                                                                          autoMationWin.elementRaise();
                                                                                          
                                                                                          //Ensure Preview is on
                                                                                          const prevBtn = autoMationWin.previewButton;
                                                                                          const prevState = prevBtn.value.invalidate().value;
                                                                                          if (prevState !== "Selected") { prevBtn.elementClick() }
                                                                                          
                                                                                          //Ensure Pro- Q window is open
                                                                                          const isProQOpen = proQInsertSelectorBtn.value.invalidate().value.startsWith("open");
                                                                                          
                                                                                          const proQWin = sf.ui.proTools.windows.whoseTitle.startsWith("Plug-in: FabFilter Pro-Q").first;
                                                                                          
                                                                                          if (!isProQOpen) {
                                                                                              proQInsertBtn.elementClick();
                                                                                              proQWin.elementWaitFor()
                                                                                          };
                                                                                          
                                                                                          // Get Pro-Q elements
                                                                                          const proQEditView = proQWin.groups.whoseTitle.is("FXTDMEditView").first;
                                                                                          
                                                                                          //Toggle Pro-Q Bands
                                                                                          let bandEnableAction
                                                                                          bandNumbersToToggle.forEach((band, index) => {
                                                                                              const bandParameter = `Band ${band} Enabled`;
                                                                                              if (index == 0) {
                                                                                                  const isProQBandEnabled = Boolean(proQEditView.children.whoseTitle.is(bandParameter)[0].value.intValue);
                                                                                          
                                                                                                  bandEnableAction = isProQBandEnabled ? "AXDecrement" : "AXIncrement";
                                                                                              }
                                                                                          
                                                                                              proQEditView.children.whoseTitle.is(bandParameter)[0].elementClick({
                                                                                                  actionName: bandEnableAction
                                                                                              })
                                                                                          })
                                                                                          
                                                                                          // Write automation to selection
                                                                                          const writeSelectionBtn = autoMationWin.buttons.whoseTitle.is("Write Automation to Selection").first;
                                                                                          
                                                                                          writeSelectionBtn.elementClick({ asyncSwallow: true })
                                                                                          sf.wait({ intervalMs: 150 })
                                                                                          
                                                                                          // Close Conf window
                                                                                          const confWin = sf.ui.proTools.confirmationDialog;
                                                                                          
                                                                                          const confWinExists = confWin.elementWaitFor({
                                                                                              onError: "Continue",
                                                                                              timeout: 75
                                                                                          }).success;
                                                                                          
                                                                                          if (confWinExists) {
                                                                                              sf.waitFor({
                                                                                                  callback: () => confWin.buttons.whoseTitle.is("OK").first.exists,
                                                                                                  onError: "Continue",
                                                                                              })
                                                                                              let confBtn = confWin.buttons.whoseTitle.is("OK").first;
                                                                                              if (confBtn.exists) confBtn.elementClick();
                                                                                          }
                                                                                          
                                                                                          // Turn off preview
                                                                                          prevBtn.elementClick();
                                                                                          
                                                                                          //Close automation window
                                                                                          autoMationWin.windowClose()
                                                                                          autoMationWin.elementWaitFor({ waitType: "Disappear" })
                                                                                          
                                                                                          // Inform user of band enabled state
                                                                                          const newToggleState = bandEnableAction == "AXIncrement" ? "enabled" : "disabled";
                                                                                          const toggledBands = bandNumbersToToggle.join(`, `)
                                                                                          
                                                                                          // sf.interaction.notify({
                                                                                          //     title: "Pro-Q",
                                                                                          //     message: `Bands ${toggledBands} are ${newToggleState}`,
                                                                                          //     keepAliveMs: 750
                                                                                          // })
                                                                                          
                                                                                          1. CChris Testa @Chris_Testa
                                                                                              2025-01-09 00:57:37.293Z

                                                                                              Yeah it's still not working. Not sure why. The latest version of the script seems to go through all the motions but it's not turning the bands on and off. The old script that is in there still works except for anything past band 4. This is what I have now. I did take off 2 steps at the end.

                                                                                              const bandNumbersToToggle = ["1"];
                                                                                              const proQInsertNumber = 4
                                                                                              
                                                                                              sf.ui.proTools.appActivateMainWindow();
                                                                                              sf.ui.proTools.mainWindow.invalidate();
                                                                                              
                                                                                              //Get PT UI Elements
                                                                                              const selectedTrack = sf.ui.proTools.selectedTrack;
                                                                                              selectedTrack.trackScrollToView();
                                                                                              const proQInsertSelectorBtn = selectedTrack.insertSelectorButtons[proQInsertNumber - 1];
                                                                                              const proQInsertBtn = selectedTrack.insertButtons[proQInsertNumber - 1];
                                                                                              
                                                                                              // Ensure automation window is open
                                                                                              sf.ui.proTools.automationWindowRequireOpenAutomationWindow();
                                                                                              const autoMationWin = sf.ui.proTools.automationWindow;
                                                                                              autoMationWin.elementRaise();
                                                                                              
                                                                                              //Ensure Preview is on
                                                                                              const prevBtn = autoMationWin.previewButton;
                                                                                              const prevState = prevBtn.value.invalidate().value;
                                                                                              if (prevState !== "Selected") { prevBtn.elementClick() }
                                                                                              
                                                                                              //Ensure Pro- Q window is open
                                                                                              const isProQOpen = proQInsertSelectorBtn.value.invalidate().value.startsWith("open");
                                                                                              
                                                                                              if (!isProQOpen) {
                                                                                                  proQInsertBtn.elementClick();
                                                                                                  const proQWin = sf.ui.proTools.windows.whoseTitle.startsWith("Plug-in: FabFilter Pro-Q").first;
                                                                                                  proQWin.elementWaitFor()
                                                                                              };
                                                                                              
                                                                                              // Get Pro-Q elements
                                                                                              const proQWindow = sf.ui.proTools.windows.whoseTitle.startsWith("Plug-in: FabFilter Pro-Q").first;
                                                                                              const proQEditView = proQWindow.groups.whoseTitle.is("FXTDMEditView").first;
                                                                                              
                                                                                              //Toggle Pro-Q Bands
                                                                                              let bandEnableAction
                                                                                              bandNumbersToToggle.forEach((band, index) => {
                                                                                                  const bandParameter = `Band ${band} Enabled`;
                                                                                                  if (index == 0) {
                                                                                                      const isProQBandEnabled = Boolean(proQEditView.children.whoseTitle.is(bandParameter)[0].value.intValue);
                                                                                              
                                                                                                      bandEnableAction = isProQBandEnabled ? "AXDecrement" : "AXIncrement";
                                                                                                  }
                                                                                              
                                                                                                  proQEditView.children.whoseTitle.is(bandParameter)[0].elementClick({
                                                                                                      actionName: bandEnableAction
                                                                                                  })
                                                                                              })
                                                                                              
                                                                                              // Write automation to selection
                                                                                              const writeSelectionBtn = autoMationWin.buttons.whoseTitle.is("Write Automation to Selection").first;
                                                                                              
                                                                                              writeSelectionBtn.elementClick({ asyncSwallow: true })
                                                                                              sf.wait({ intervalMs: 150 })
                                                                                              
                                                                                              // Close Conf window
                                                                                              const confWin = sf.ui.proTools.confirmationDialog;
                                                                                              
                                                                                              const confWinExists = confWin.elementWaitFor({
                                                                                                  onError: "Continue",
                                                                                                  timeout: 75
                                                                                              }).success;
                                                                                              
                                                                                              if (confWinExists) {
                                                                                                  sf.waitFor({
                                                                                                      callback: () => confWin.buttons.whoseTitle.is("OK").first.exists,
                                                                                                      onError: "Continue",
                                                                                                  })
                                                                                                  let confBtn = confWin.buttons.whoseTitle.is("OK").first;
                                                                                                  if (confBtn.exists) confBtn.elementClick();
                                                                                              }
                                                                                              
                                                                                              // Turn off preview
                                                                                              prevBtn.elementClick();