By Kitch Membery @Kitch2019-10-20 23:22:54.577Z
How do I find the name of the "track rename popup window", when its title changes to reflect the given name of the track?
I'd like to add a wait for "track rename popup window" function to my code.
Then add a Suffix of "_ORIGINAL" to the track name ie "Audio 1_ORIGINAL" where "Audio 1" is the name of the track.
This is what I have so far;
//Activate Pro Tools
sf.ui.proTools.appActivateMainWindow
//Get selected Track name
var selectedTrackName = sf.ui.proTools.selectedTrackNames[0];
//Open Rename Track dialog
sf.ui.proTools.selectedTrack.trackOpenRenameDialog();
//Append Selected Track with "_ORIGINAL"
sf.ui.proTools.windows.first.textFields.whoseLabel.startsWith('Name').first.elementSetTextAreaValue({
value: selectedTrackName + "_ORIGINAL",
});
Thanks in advance.
K
- Kitch Membery @Kitch2019-10-21 00:23:28.656Z2019-10-21 02:05:39.062Z
I have figured out the the track naming issue with the following code;
//Activate Pro Tools sf.ui.proTools.appActivateMainWindow //Get selected Track name var selectedTrackName = sf.ui.proTools.selectedTrackNames[0]; //Append Selected Track with "_ORIGINAL" sf.ui.proTools.selectedTrack.trackRename({ newName: selectedTrackName + '_ORIGINAL', });
Christian Scheuer @chrscheuer2019-10-21 08:49:08.988Z
Beautiful :)
Nit: You have a slight typo in the first line - by not ending your line with
();
you're essentially not calling the action. It should be:sf.ui.proTools.appActivateMainWindow();
Kitch Membery @Kitch2019-10-21 18:29:27.321Z
Oops! :-) Thanks for that.
Excited about 3.1 Christian.
K