No internet connection
  1. Home
  2. How to

How to select Tracks tab in Modify Groups dialog

By J.R. Fountain @J_R_Fountain
    2019-11-18 19:30:20.316Z2019-11-18 19:41:32.266Z

    Hey,

    I've created a macro to modify a group I use to link channels for panning. I want to add one piece to it though to first select the "Tracks" tab in the Modify Groups dialogue box. Anyone know how to do that? Here's the existing code...

    Thx!
    J.R.

    sf.ui.proTools.appActivateMainWindow();
    
    sf.keyboard.press({
        keys: "ctrl+cmd+g",
    });
    
    var win = sf.ui.proTools.windows.whoseTitle.is('Modify Groups').first;
    win.buttons.whoseTitle.startsWith('Replace').first.elementClick();
    
    var win = sf.ui.proTools.windows.whoseTitle.is('Modify Groups').first;
    win.buttons.whoseTitle.startsWith('Replace').first.elementClick();
    
    win.getFirstWithTitleContaining("Tracks").elementClick();
    
    sf.keyboard.press({
        keys: "numpad enter",
    });
    
    Solved in post #2, click to view
    • 1 replies
    1. I would do it like this:

      //Activate Pro Tools
      sf.ui.proTools.appActivateMainWindow();
      
      //Modify Group(s)
      sf.keyboard.press({
          keys: "ctrl+cmd+g",
      });
      
      //Define reference to window
      var win = sf.ui.proTools.windows.whoseTitle.is('Modify Groups').first;
      
      //Click the "Tracks" tab
      win.children.whoseTitle.startsWith("Tracks").first.elementClick();
      
      //Wait for the "Replace" button to appear (finalize moving to the Tracks tab)
      win.buttons.whoseTitle.startsWith('Replace').first.elementWaitFor();
      
      //Now click that Replace button
      win.buttons.whoseTitle.startsWith('Replace').first.elementClick();
      
      //Click OK
      win.buttons.whoseTitle.startsWith('OK').first.elementClick();
      
      //Wait for window to close
      win.elementWaitFor({ waitForNoElement: true });
      
      ReplySolution