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();
Chris Shaw @Chris_Shaw2025-11-18 17:32:07.572Z2025-11-18 17:55:03.276ZThis 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()- VViktor Szabo @Viktor_Szabo
Ejjj yess.
This does, perfect, try to learn the solution from this.
Thank you so much
Chris Shaw @Chris_Shaw2025-11-18 17:56:28.153ZI was able to simplify the
popupMenuSelectcall (line 15).
The code above has been changed
In reply toViktor_Szabo⬆:Chris Shaw @Chris_Shaw2025-11-18 17:51:27.740ZThis 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 })- VViktor Szabo @Viktor_Szabo
Gorgeous
Thank you, working correctly
In reply toViktor_Szabo⬆:Kitch Membery @Kitch2025-11-18 18:22:55.032ZFor 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"], });- VViktor Szabo @Viktor_Szabo
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?
Kitch Membery @Kitch2025-11-18 18:46:47.063ZYes 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. :-)
- VViktor Szabo @Viktor_Szabo
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
Kitch Membery @Kitch2025-11-18 18:59:11.044ZAwesome! :-)
- In reply toKitch⬆:
Kitch Membery @Kitch2025-11-18 18:37:48.177ZSorry for the duplicate solution, I opened this message this morning and had not refreshed it.
- VViktor Szabo @Viktor_Szabo
Two solution is always better than none, huge thank you for all your help.
- In reply toKitch⬆:PPhilip weinrobe @Philip_weinrobe
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 :)
Kitch Membery @Kitch2026-01-10 01:53:22.815ZSomething 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!