MacOS 15.4 broken sheets navigate to path
Title
MacOS 15.4 broken sheets navigate to path
What do you expect to happen when you run the script/macro?
Loads I/O settings
Are you seeing an error?
Element was not found - line 39
Script fails to open the 'go' sheet using sf.keyboard.type({ text:'/')}
What happens when you run this script?
Script fails to open the 'go' sheet using sf.keyboard.type({ text:'/')}
How were you running this script?
I clicked the "Run Script" or "Run Macro" button in SoundFlow
How important is this issue to you?
5
Details
{ "inputExpected": "Loads I/O settings", "inputIsError": true, "inputError": "Element was not found - line 39 \n\nScript fails to open the 'go' sheet using sf.keyboard.type({ text:'/')}", "inputWhatHappens": "Script fails to open the 'go' sheet using sf.keyboard.type({ text:'/')}", "inputHowRun": { "key": "-MpfwYA4I6GGlXgvp5j1", "title": "I clicked the \"Run Script\" or \"Run Macro\" button in SoundFlow" }, "inputImportance": 5, "inputTitle": "MacOS 15.4 broken sheets navigate to path" }
Source
const ioSettingsFolder = "~/Documents/Pro Tools/IO Settings/";
function importBusSettings(presetName) {
//Activate Pro Tools Window
sf.ui.proTools.appActivateMainWindow();
//Open I/O Window
sf.ui.proTools.menuClick({
menuPath: ["Setup", "I/O..."],
});
const ioWin = sf.ui.proTools.windows.whoseTitle.is('I/O Setup').first;
//Select "Bus" Tab
ioWin.radioButtons.whoseTitle.startsWith('Bus').first.elementClick();
//Wait for Tab ("Active Busses" text is unique to the bus tab)
ioWin.children.whoseRole.is("AXStaticText").whoseValue.is('Active Busses:').first.elementWaitFor();
//Click 'Import Settings...'
ioWin.buttons.whoseTitle.is('Import Settings...').first.elementClick();
const openWin = sf.ui.proTools.windows.whoseTitle.is('Open').first;
//const openWinLocation = sf.ui.proTools.windows.whoseTitle.is("Open").first.popupButtons.whoseTitle.is("Where:").first
//Wait for 'Open' window
openWin.elementWaitFor()
//openWinLocation.elementWaitFor()
//Wait Again
//sf.wait({intervalMs: 200})
//Open 'go' sheet
sf.keyboard.type({ text: '/' });
//Wait for Open window
openWin.sheets.first.elementWaitFor();
const sheet = openWin.sheets.first;
if (sheet.comboBoxes.first.exists) {
//Set preset name
sheet.comboBoxes.first.value.value = presetName;
//Click "Go"
sheet.buttons.whoseTitle.is('Go').first.elementClick();
} else {
//Set presetPath
sheet.textFields.first.value.value = `${ioSettingsFolder}${presetName}`;
sf.keyboard.press({ keys: 'return' });
}
sheet.elementWaitFor({ waitType: "Disappear" });
const openBtn = openWin.buttons.whoseTitle.is("Open").first;
let tryCount = 0;
while (!openBtn.isEnabled || tryCount >= 10) {
sf.wait({ intervalMs: 20 });
tryCount++
}
//Click Open
openWin.buttons.whoseTitle.is("Open").first.elementClick();
//Wait for Dialog window
sf.ui.proTools.confirmationDialog.elementWaitFor();
//Delete unused buses prompt
sf.ui.proTools.confirmationDialog.buttons.whoseTitle.is('No').first.elementClick();
//Click OK
ioWin.buttons.whoseTitle.is('OK').first.elementClick();
}
importBusSettings("Keys Gates.pio");
Links
User UID: sKu19XXNXHYSdEMmZtHz8CozbdS2
Feedback Key: sffeedback:sKu19XXNXHYSdEMmZtHz8CozbdS2:-ONSTon7HvPpspVFkmNK
Feedback ZIP: 9cI0LArKCpC9VBHSfENZMOoxoD11g9yh+I5KuAkuZGiB5fn2/t+8U2lQl2GPfmBJ7eLx+U3uVSgO1BPRyoKNf/dWdyadRr8qfwPYP3S4F3oVvn/CsuALjwBQ52LlZxcsQpVvY6vRzt8alwFe665XGYPeOG67K2u9PSz1sxfnHl+rjkb5cKdBIsIZd/fBL3xnnNaUZRCmDYRdwffnw3Ih5jh9RItLNc4I5KBeAok8URni9zlS/3gQqNDH00PYDW8bZA3McMegMizg9imPDS/eqsNSYCCKZL8Vkf2SrSYmD4tk2XGdQK9OLoKjaRxLHPSvMXprAym8tXJsAXR3mH8IzZVeUAuBCXbEn+SXY4GLOJ0=
Linked from:
- FForrester Savell @Forrester_Savell
This is easily fixed with
sf.wait({intervalMs: 200})
before calling the 'go' window.However, I'm intrigued as to what element is not focused and needs to be waited for before 'slash' is pressed to open 'Go' window. I thought it might be the
.popupButtons.whoseTitle.is("Where:")
but that's not it.Kitch Membery @Kitch2025-04-10 17:50:29.048Z
In this case, I believe the failure is occurring because the script has to wait for the OS to complete the animation of the dialog opening. Therefore, a manual wait might be necessary here.
- FForrester Savell @Forrester_Savell
Hey @Kitch
I'm seeing some variation in the wait time necessary for the Go sheet to work across different scripts/sessions. Is this something that would likely be addressed in a Soundflow update relevant to changes in MacOS15.4, so that the
openWin.elementWaitFor()
specifically waits for the animation to complete before moving on?Kitch Membery @Kitch2025-04-14 17:10:02.540Z
Thanks @Forrester_Savell,
When I have a moment, I'll have to dig deeper to see if there's a way to identify when the Go sheet appears.
- SIn reply toForrester_Savell⬆:SoundFlow Bot @soundflowbot
This issue is now tracked internally by SoundFlow as SF-1699