No internet connection
  1. Home
  2. How to

How do I find the name of popup window?

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

Solved in post #2, click to view
  • 3 replies
  1. 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',
    });
    
    Reply1 LikeSolution
    1. 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();
      
      1. Kitch Membery @Kitch2019-10-21 18:29:27.321Z

        Oops! :-) Thanks for that.

        Excited about 3.1 Christian.
        K