By J.R. Fountain @J_R_Fountain
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",
});
- Christian Scheuer @chrscheuer2019-11-18 19:44:37.015Z
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 });