No internet connection
  1. Home
  2. How to

Want to clear all window configurations in Pro Tools/ How to set a preferences menu always off, not toggle

By Viktor Szabo @Viktor_Szabo
    2025-11-18 16:09:15.292Z

    Hi

    Would like to have a script to clear all window configurations in pro tools. For this I have not found any but in command, so do it as I would do it by hand:
    open window configurations
    top right corner local menu
    select delete
    approve with OK

    
    sf.ui.proTools.menuClick({
        menuPath: ["Window","Configurations","Window Configuration List"],
    });
    
    sf.ui.proTools.sfx.windows.whoseTitle.is("Window Configurations").first.buttons.whoseTitle.is("menu popup").first.elementClick();
    
    sf.keyboard.press({
        keys: "d",
        repetitions: 1,
    });
    
    
    

    As the top right local menu opens up I cannot pick it as a UI, and here my project stopped, need some help for this please
    Tried also with mouse click UI element, but that is also not working (os26.1, PT2025.10)
    **
    The second issue:**
    I would like to always turn off /Setup/Preferences/Operations/ Latch Forward/Rewind
    This is were I got, but this is a Toggle mode in this case

    
    sf.ui.proTools.menuClick({
        menuPath: ["Setup","Preferences..."],
    });
    
    sf.ui.proTools.windows.whoseTitle.is("Pro Tools Preferences").first.radioButtons.whoseTitle.is("Operation 2 of 9").first.elementClick();
    
    sf.ui.proTools.windows.whoseTitle.is("Pro Tools Preferences").first.groups.whoseTitle.is("Transport").first.checkBoxes.whoseTitle.is("Latch Forward/Rewind").first.elementClick({
        onCancel: "Continue",
        onError: "Continue",
    });
    
    sf.ui.proTools.windows.whoseTitle.is("Pro Tools Preferences").first.buttons.whoseTitle.is("OK").first.elementClick();
    
    
    Solved in post #2, click to view
    • 14 replies
    1. Chris Shaw @Chris_Shaw2025-11-18 17:32:07.572Z2025-11-18 17:55:03.276Z

      This will delete all window configurations:

      //  Define Window Configurations window
      const windowConfigurationsWin = sf.ui.proTools.windows.whoseTitle.is("Window Configurations").first;
      
      // Open if needed
      if (!windowConfigurationsWin.exists) sf.ui.proTools.menuClick({
          menuPath: ["Window", "Configurations", "Window Configuration List"],
      });
      
      windowConfigurationsWin.elementWaitFor()
      
      //Define popup menu
      const confWindowPopup = windowConfigurationsWin.buttons.whoseTitle.is("menu popup").first
      
      // Click "Delete All"
      confWindowPopup.popupMenuSelect({
          menuPath: ["Delete All"]
      });
      
      // Deal with confirmation Dialog
      const confDialog = sf.ui.proTools.confirmationButtonDialog
      confDialog.elementWaitFor()
      confDialog.buttons.whoseTitle.is("Yes").first.elementClick()
      
      // Close Window Configuration window
      windowConfigurationsWin.windowClose()
      
      Reply2 LikesSolution
      1. VViktor Szabo @Viktor_Szabo
          2025-11-18 17:35:35.877Z

          Ejjj yess.
          This does, perfect, try to learn the solution from this.
          Thank you so much

          1. I was able to simplify the popupMenuSelect call (line 15).
            The code above has been changed

        • In reply toViktor_Szabo:

          This will disable the " Latch Forward/Rewind" preference

          // Define Preferences window
          const prefsWindow = sf.ui.proTools.windows.whoseTitle.is("Pro Tools Preferences").first
          
          // Open if necessary
          if (!prefsWindow.exists) {
              sf.ui.proTools.menuClick({
                  menuPath: ["Setup", "Preferences..."],
              });
          }
          
          prefsWindow.elementWaitFor()
          
          // Open Operation tab
          const operationTab = prefsWindow.radioButtons.whoseTitle.startsWith("Operation").first;
          
          operationTab.elementClick()
          
          // Disable "Latch Forward/Rewind"
          const transportGroup = prefsWindow.groups.whoseTitle.is("Transport").first
          
          const latchCheckbox = transportGroup.checkBoxes.whoseTitle.is("Latch Forward/Rewind").first
          
          latchCheckbox.checkboxSet({ targetValue: "Disable" })
          
          
          // Close prefs window
          const okButton = prefsWindow.buttons.whoseTitle.is("OK").first
          
          okButton.elementClick()
          
          prefsWindow.elementWaitFor({ waitForNoElement: true })
          
          1. VViktor Szabo @Viktor_Szabo
              2025-11-18 17:58:34.249Z

              Gorgeous
              Thank you, working correctly

            • In reply toViktor_Szabo:
              Kitch Membery @Kitch2025-11-18 18:22:55.032Z

              Hi @Viktor_Szabo

              For the first script, try this...

              sf.ui.useSfx();
              
              const windowConfigurationsWindow = sf.ui.proTools.windows.whoseTitle.is("Window Configurations").first
              
              if (!windowConfigurationsWindow.exists) {
                  sf.ui.proTools.dawCommands.getByUniquePersistedName("OpenWindowConfigsWindow").run();
              }
              
              windowConfigurationsWindow.elementWaitFor();
              
              windowConfigurationsWindow.buttons.whoseTitle.is("menu popup").first.popupMenuSelect({
                  menuPath: ["Delete All"],
              });
              
              1. VViktor Szabo @Viktor_Szabo
                  2025-11-18 18:37:04.563Z

                  Thank you Kitch, working perfectly.
                  Can I build up this from factory macros also? And also the latch Forward box tick always off is also can be done by macros or just scripts?

                  1. Kitch Membery @Kitch2025-11-18 18:46:47.063Z

                    Hi @Viktor_Szabo

                    Yes it can.. With a combination of Macro actions.

                    • A menu click action to open the Pro Tools preferences.
                    • A Wait for UI Element macro action, to wait for the window to appear.
                    • A Click UI Element macro action to click the Operations tab.
                    • A Set Checkbox macro action to disable the Latch Forward/Rewind Checkbox.
                    • A Click UI Element macro action to click the OK button.
                    • A Wait for UI Element macro action, to wait for the window to disappear.

                    Let me know if you need further guidance on this. :-)

                    1. VViktor Szabo @Viktor_Szabo
                        2025-11-18 18:50:16.446Z

                        Yes, it is clear, have not seen the "set checkbox" macro, or was looking for it with wrong search words.
                        That was my missing part of this chain, I just could do it toggle mode with always clicking on that.
                        happy, thank you

                        1. Kitch Membery @Kitch2025-11-18 18:59:11.044Z

                          Awesome! :-)

                    2. In reply toKitch:
                      Kitch Membery @Kitch2025-11-18 18:37:48.177Z

                      @Chris_Shaw & @Viktor_Szabo,

                      Sorry for the duplicate solution, I opened this message this morning and had not refreshed it.

                      1. VViktor Szabo @Viktor_Szabo
                          2025-11-18 18:39:24.055Z

                          Two solution is always better than none, huge thank you for all your help.

                        • In reply toKitch:
                          PPhilip weinrobe @Philip_weinrobe
                            2026-01-09 22:04:36.682Z

                            where would we insert an "auto accept" into this so i don't have to click the "yes" button in the popup dialog?
                            love this little tool :)

                            1. Kitch Membery @Kitch2026-01-10 01:53:22.815Z

                              Something like this, @Philip_weinrobe?

                              /**
                               * Deletes all Window Configurations in Pro Tools.
                               * If the Window Configurations window is not already open,
                               * it will be opened and then closed again at the end.
                               */
                              function deleteAllWindowConfigurations() {
                                  // Enable SFX UI paths for Pro Tools
                                  sf.ui.useSfx();
                              
                                  // Reference the Window Configurations window
                                  const windowConfigurationsWindow = sf.ui.proTools.windows.whoseTitle.is("Window Configurations").first;
                              
                                  // Check whether the window is already open
                                  const wasWindowAlreadyOpen = windowConfigurationsWindow.exists;
                              
                                  // Open the Window Configurations window if it is not open
                                  if (!wasWindowAlreadyOpen) {
                                      sf.ui.proTools.dawCommands.getByUniquePersistedName("OpenWindowConfigsWindow").run();
                                  }
                              
                                  // Wait until the window is fully available
                                  windowConfigurationsWindow.elementWaitFor();
                              
                                  // Open the popup menu and select "Delete All"
                                  windowConfigurationsWindow.buttons.whoseTitle.is("menu popup").first.popupMenuSelect({
                                      menuPath: ["Delete All"],
                                  });
                              
                                  // Reference the confirmation dialog
                                  const confirmationButtonDialog =
                                      sf.ui.proTools.sfx.confirmationButtonDialog;
                              
                                  // Wait for the confirmation dialog to appear
                                  confirmationButtonDialog.elementWaitFor();
                              
                                  // Click the "Yes" button to confirm deletion
                                  confirmationButtonDialog.buttons
                                      .whoseTitle.is("Yes")
                                      .first
                                      .elementClick();
                              
                                  // Wait for the Window Configurations window to be ready again
                                  windowConfigurationsWindow.elementWaitFor();
                              
                                  // Close the window only if it was not originally open
                                  if (!wasWindowAlreadyOpen) {
                                      windowConfigurationsWindow.windowClose();
                                  }
                              }
                              
                              deleteAllWindowConfigurations();
                              

                              Rock on!