Basically, it's just a Loop that sends a Control Click
and waits 100ms to see if the Window becomes active
that a successful ControlClick is supposed to produce.
If ControlClick was successful, a "Break" is executed
to exit the Loop and the script continues. If the active
Window has not changed to the one solicited by the
ControlClick, it's assumed that the ControlClick command
wasn't recognized and the Loop repeats sending it again.
This has worked successfully for me. It's not a fix for
unreliable ControlClick operations, but it is a workaround.
Code:
SetControlDelay, 100
id := WinExist("A")
Loop, 10
{
; You will need to change the x & y Screen Locations for Your Control
ControlClick, x1128 y815, ahk_id %id%,,,, Pos
sleep, 100
; You will also need to provide the Windows Title in %NextDialog%
; It should be the Window Title of the active Window that the
; ControlClick Operation above is supposed to produce.
IfWinActive, %NextDialog%
break
}
; Script Continues
; ..
; ...
; ....
; .....
; etc