The app I am trying to automate, has a settings window, where the path to a cache-folder can be set. I would like to find out the path to that folder using ahk.
So far, with ahk and the UIA-Interface (by @Descolada ), I can click on the "select folder" icon to open a dialog, and the currently set cache-folder is displayed in a typical "select folder"-dialog.
How can I find out the currentliy open folder in this dialog? I tried to rightclick the adressbar using UIA, which works, and a context menu is displayed. But I can't figure out how to click the "copy address as text" menu entry.
Code: Select all
toolbarEl := UIA.ElementFromHandle(automatedAppWinName).FindElement({Type:"SplitButton", Name:"all locations"}) ; address toolbar
toolbarEl.ControlClick("right") ; rightclick on that toolbar
Sleep(200)
menuEl := UIA.ElementFromHandle(automatedAppWinName).FindElement({Type:"MenuItem", Name:"copy address as text""}) ; UIA access to the context menu - this line fails (element not found)
menuEl.Click("left")