Making "Rename Selected Track" work when windows are obscuring the Track Title bar
Making this post for @Stephanie_Brown.
You were having some issues with getting "Rename Selected Track" to work correctly for you. I believe the problem stems from having the track you are trying to rename off-screen, or potentially obscured by a floating window like AudioSuite or a Plugin, etc.
Here's a video explaining some alternate approaches:
Also here's the script version that may work better for you:
if (!sf.ui.proTools.isRunning) throw `Pro Tools is not running`;
sf.ui.proTools.appActivateMainWindow();
sf.ui.proTools.mainWindow.invalidate();
sf.ui.proTools.selectedTrack.trackScrollToView();
sf.ui.proTools.selectedTrack.titleButton.elementClick({ actionName: "AXShowMenu", asyncSwallow: true });
// Using keyboard simulation here, but it should be pretty reliable
sf.keyboard.press({ keys: 'option+down' });
sf.ui.proTools.focusedWindow.menuItems.whoseTitle.is("Rename...").first.elementClick();
- Chad Wahlbrink @Chad2025-07-01 17:56:05.378Z
@Stephanie_Brown, the other approach you could take would be to set a custom keyboard shortcut in Pro Tools keyboard shortcut manager (in "Setup" > "Keyboard Shortcuts..." from the Pro Tools menu):
Then you could have a macro press that keyboard shortcut like this. This would be the MOST reliable way to do this currently.
- MIn reply toChad⬆:Matt Friedman @Matt_Friedman
Here's yet another version :) that does not manipulate the edit window with scrolling or require creating any Custom Kybd shortcuts.
This will prompt you for a new track name, and only renames the first track in any selection of tracks
if (!sf.ui.proTools.isRunning) throw `Pro Tools is not running`; sf.ui.proTools.appActivateMainWindow(); sf.ui.proTools.mainWindow.invalidate(); function renameTrack() { const tracks = sf.app.proTools.tracks.invalidate().allItems; const selectedTrack = tracks.find(t => t.isSelected); if (!selectedTrack) return; const newName = sf.interaction.popupText({ title: "Rename Track" }).text; const nameExists = tracks.some(t => t.name === newName); if (nameExists) { log("Track name already exists."); } else { sf.app.proTools.renameTrack({ oldName: selectedTrack.name, newName, onError: "Continue", }); } }; renameTrack();
- SStephanie Brown @Stephanie_Brown
@Chad I was having an issue with another script, I think you had mentioned updating to the newest version of Soundflow, and got my engineers to do so. Now the original preset for Rename Tracks works.
Chad Wahlbrink @Chad2025-07-04 00:11:27.960Z
Amazing!! Yes, updating to the latest version of SoundFlow often fixes a lot of issues.
Glad to hear!