SF not always finding menu items in popup menu
Hi!
I have an easy script that helps me switch between working in Dolby Atmos and working in "regular" stereo. The usually runs fine after I have used Pro Tools for a while that day and have been switching Playback Engine before I run the script. However, when I launch Pro Tools and have not manually switched engine that day - SF cannot find the menu items in the popup menu for the Playback Engine, despite the fact that they are in the menu and have been found in earlier trys.
Am I missing something here - Do one have to have a "fetch items" script for SF to find all the items? I have the newest version of PT Ultimate and had the same problem with the version before that.
Here is the Script in its full, but the problem is at the Changing Playback Engine Phase in the beginning of the script - If SF manage to get past that part, the rest always run smoothly:
sf.ui.proTools.appActivate();
sf.ui.proTools.appWaitForActive();
sf.keyboard.press({
keys: "escape",
});
sf.ui.proTools.menuClick({
menuPath: ["Setup","Playback Engine..."],
});
sf.ui.proTools.windows.whoseTitle.is('Playback Engine').first.elementWaitFor();
sf.ui.proTools.windows.whoseTitle.is('Playback Engine').first.popupButtons.first.popupMenuSelect({
menuPath: ["Dolby Audio Bridge"],
pollingInterval: 200,
});
sf.ui.proTools.windows.whoseTitle.is('Playback Engine').first.popupButtons.allItems[1].popupMenuSelect({
menuPath: ["1024 Samples"],
});
sf.ui.proTools.windows.whoseTitle.is('Playback Engine').first.buttons.whoseTitle.is('OK').first.elementClick();
sf.ui.proTools.windows.whoseTitle.is('Playback Engine').first.elementWaitFor({
waitType: "Disappear",
});
sf.ui.proTools.menuClick({
menuPath: ["Setup","Peripherals..."],
});
sf.ui.proTools.windows.whoseTitle.is('Peripherals').first.elementWaitFor();
sf.ui.proTools.windows.whoseTitle.is('Peripherals').first.radioButtons.whoseTitle.is('Dolby Atmos 8 of 8').first.elementClick();
sf.ui.proTools.windows.whoseTitle.is('Peripherals').first.checkBoxes.first.checkboxSet({
targetValue: "Enable",
});
sf.ui.proTools.windows.whoseTitle.is('Peripherals').first.buttons.whoseTitle.is('OK').first.elementClick();
sf.ui.proTools.windows.whoseTitle.is('Peripherals').first.elementWaitFor({
waitType: "Disappear",
});
sf.ui.proTools.menuClick({
menuPath: ["File","Open Session..."],
});
As Always, thank you for your help!
All the best,
Gabriel
- Raphael Sepulveda @raphaelsepulveda2021-01-11 20:48:54.597Z
Hey Gabriel,
Yes, this is a known issue with modal dialogs. See Christian's response in this thread: https://forum.soundflow.org/-3699#post-4
On that same thread, I provide a hacky workaround but the easiest thing to do is to start up Pro Tools and run an SF command that usually works. That way it triggers accessibility mode and SF can read popup menus.
- GGabriel Lundh @Gabriel_Lundh
Thannk you Raphael for sheding some light on this issue - sorry I did not find that thread earlier!
Great resolution for the problem and it helps to know the issue!Have a great day!
My best,
Gabriel