Wait for accessibilityId

Propose new features and changes
obeliksz
Posts: 1
Joined: 27 Aug 2020, 08:40

Wait for accessibilityId

28 Aug 2020, 05:17

Hello Guys!

I have an automation that is unreliable because its dependant on time delays rather than waiting for a UI element to appear or disappear.
I find that this has to be doable in ahk, but inner window component seem to be not as first class citizens as handling just the window as with WinWait or similar.
We can use Window Inspector to get the ui's ids/name but its not clear for me how to use them inside ahk... maybe the fact that ahk can be used to create GUI and instructions on manipulating those are interfering somewhat with this subject.

For example I want to connect to a VPN that requires terms&conditions acceptance before establishing the connection, this involves a lot of clicks that is madness if you have to connect/disconnect many times during the day.
vpn-connection-madness.gif
vpn-connection-madness.gif (152.9 KiB) Viewed 247 times
My script can not be reliable without big timeouts but that would defeat the purpose of scripting it.

So I wish at least for a tutorial on using ahk with accessability id/names, and making using them just as easy as waiting for a window to appear or disappear.

Incorporating such calls would really improve AHK... or making these more visible.
There are also the brute OCR screen readers which could be incorporated for similar use, here is an example for that: https://www.autohotkey.com/boards/viewtopic.php?f=6&t=17834&sid=b942373bc8cc2801e5f02e733d3917a1

Thanks!
Attachments
connect_vpn.ahk
(678 Bytes) Downloaded 8 times
gwarble
Posts: 459
Joined: 30 Sep 2013, 15:01

Re: Wait for accessibilityId

02 Sep 2020, 18:51

i don't have an answer for your question, but maybe solve your problem a different way

i think there is a wmic way and a powershell way, but i think this is still supported:

Code: Select all

Run, rasdial vpnname
sleep, 30000
Run, rasdial vpnname /disconnect
EitherMouse - Multiple mice, individual settings . . . . www.EitherMouse.com . . . . forum . . . .
malcev
Posts: 718
Joined: 12 Aug 2014, 12:37

Re: Wait for accessibilityId

06 Sep 2020, 19:41

So I wish at least for a tutorial on using ahk with accessability id/names, and making using them just as easy as waiting for a window to appear or disappear.
Search Acc_SetWinEventHook.

Return to “Wish List”

Who is online

Users browsing this forum: No registered users and 6 guests