how to select an item like "Open File" menu
Hi, how do you guys select an item from a dialog window like this one (kind of "Open File" on Dante Controller? Thanks

- RRicardo Cutz @Ricardo_Cutz
hi @Kitch can you give a look on this one?
I manage to do it using the "Click relative, but I guesst there is a more elegant way to do that, rigth?
thanks!Kitch Membery @Kitch2022-02-11 20:18:14.031Z
Hi @Ricardo_Cutz,
I'm sure there is. Unfortunately I don't have this software to try it out though.
What happens when you are in this window and you press the "/" key on your keyboard?
- RRicardo Cutz @Ricardo_Cutz
I'm at home now, but next Monday I will try.
But it is basically a Menu> Open File> List of files> Open button (enter/return), then there is a list of options to what load, but this is a simple "Click UI Element" and it is working.Kitch Membery @Kitch2022-02-11 21:21:41.128Z
Sounds good, If pressing the "/" key opens a dialog sheet that allows you to enter the path to the .xml file, then you'll be able to programmatically select the file in a more robust way.
Either way let me know on Monday. Have a great weekend :-)
- RRicardo Cutz @Ricardo_Cutz
Hi @Kitch good morning.
just pressing "/" on this dialogue window does nothing.
But this concpet could be good for me for other situations?
I usually need to change I/O settings on Pro Tools
During a movi mix I usually have 5 Final Mix sessions that I would open everyday or so during 2 or 3 weeks, so having macros to do it by project would be nice ( and probably it would be easy customizable after a project ending).
It is possible to use it on OPEN SESSION Pro Tools comand?
ThanksKitch Membery @Kitch2022-02-14 23:23:12.180Z
Yes simulating the "/" or "Command + Shift + G" keypress should work in most "Open File" type windows to allow a file path to be entered :-)
- In reply toRicardo_Cutz⬆:
Kitch Membery @Kitch2022-02-14 23:34:15.110Z
Unfortunately, because I don't have the Dante Controller software, It will be difficult to work out how to select the .xml file you want programmatically.
On the off chance I can work it out while flying blind, could you create a macro and use two "Click UI Element" macro actions to pick the first and second .xml files from the table. Once you've done that, convert the macro to a script and paste it here in the thread, and I'll see if I can make it happen.
Rock on!
- RRicardo Cutz @Ricardo_Cutz
@Kitch I try the "/" or "Command+ Shuft+ G" in the Pro tools I/O window, after the import settings, and did not get it to work. I will try to do it again tomorrow and paste the script. But I was not able to properly call the "GO TO" dialogue window, and when I have it opened, I was not able to select the text field... I guess it is not a text field, correct?
The Dante Controller is free. I can send it to you, so you don't have to make an account to download it If you think it would be easier or faster.
- RIn reply toRicardo_Cutz⬆:Ricardo Cutz @Ricardo_Cutz
@Kitch I have been trying to use the GO TO command in some Pro Tools windowns, namely to load an I/O Settings or to open a session. I undertand the GO TO process, how do write down the path, but for exemple, in this window in the picture, I can't send the Shift+Command+G... It always return a error. Is it need to select this window? Also I don't know how to select the text field in the GO TO Window. How to do this?
It always return an error... i guess it does not find the window to open the GO TO
thanks!
Kitch Membery @Kitch2022-02-15 19:11:39.159Z
Hi @Ricardo_Cutz,
To open the Path sheet, you need to simulate a Key press.
sf.keyboard.press({ keys: "cmd+shift+g", });
or
sf.keyboard.press({ keys: "/", });
This can also be done using the "Press Key" macro action.
Here is an example script for importing a I/O settings.
function navigateToFilePath(path) { const win = sf.ui.proTools.windows.whoseTitle.is('Open').first; win.elementWaitFor(); sf.keyboard.press({ keys: "cmd+shift+g", }); win.sheets.first.elementWaitFor(); //win.sheets.first.comboBoxes.first.value.value = path; win.sheets.first.textFields.first.elementSetTextFieldWithAreaValue({ value: path }); sf.keyboard.press({ keys: "return", }); win.sheets.first.elementWaitFor({ waitForNoElement: true, timeout: 500 }, '"Go to" sheet didn\'t close in time'); win.buttons.whoseTitle.is('Open').first.elementClick({}, `Could noot open the preset file`); win.elementWaitFor({ waitType: "Disappear" }) //Delete Unused Busses const dlg = sf.ui.proTools.confirmationDialog.elementWaitFor({ waitType: "Appear", timeout: 100, pollingInterval: 10, onError: 'Continue' }).element; if (dlg.exists) { dlg.buttons.whoseTitle.is('No').first.elementClick(); } } function importIoSettings({ path }) { sf.ui.proTools.appActivateMainWindow(); sf.ui.proTools.menuClick({ menuPath: ['Setup', 'I/O...'] }, `Could not click I/O Menu`); const ioWin = sf.ui.proTools.windows.whoseTitle.is('I/O Setup').first; ioWin.elementWaitFor({}, `Could not find I/O window`); ioWin.checkBoxes.whoseTitle.is('Apply to all tabs').first.checkboxSet({ targetValue: "Enable" }); ioWin.buttons.whoseTitle.is('Import Settings...').first.elementClick(); navigateToFilePath(path); ioWin.elementWaitFor({}, `Could not find I/O window`); ioWin.buttons.whoseTitle.is("OK").first.elementClick(); ioWin.elementWaitFor({waitType:"Disappear"}, `Could not find I/O window`); } importIoSettings({ path: "~/Documents/Pro Tools/IO Settings/C24 Mix.pio" });
Let me know if that makes sense. :-)
- RRicardo Cutz @Ricardo_Cutz
Thanks @Kitch .
I'm using macros, since I don't know how to program.
Here is what I didsf.ui.proTools.menuClick({ menuPath: ["File","Open Session..."], }); sf.ui.proTools.windows.whoseTitle.is("Open").first.elementWaitFor(); sf.keyboard.press({ keys: "cmd+shift+g",});
Now it is working... I don't know what changed....
So, if I do get the "GO TO" Dialogue, how do I insert the path that I need?
Please, there is a macro?The Text you see in the video was previouslly entered...
https://drive.google.com/file/d/1a2kY-RpjEI8jvTL2W9hzBiLYFn_C2pYK/view?usp=sharingIs it necessary to previously enter all paths?
Kitch Membery @Kitch2022-02-16 07:46:13.456Z
I'm glad you are making progress @Ricardo_Cutz,
To enter the text into Text Fields you can use the "Set Value of Text Field With Text Area" Macro Action.
But in this situation where you are just trying to open a session with Pro Tools, you can use the "Open a File" Macro Action and enter the session file path in the Path property. :-)
Rock on!