Hi,
we are using testingsoftware from other companies (mercury) and even with "professional" software some clicks are not reliable.
Thus it's not the fault of AHK (only to mention it)
I made a small function as workaround.
The function clicks on the button (Parameter1) on the window (Parameter2) and waits till a new window appears with the title (Parameter3).
If the expected window does not appear within 2 seconds, the functions tries to click again. We never had problems again.
We click on a button and almost ever a new window should appear. Thus we can use that function.
Code:
KlickimmerWieder("Button2", "Windowtitle, "Select folder")
...
...
return
...
...
;Klickt auf dem Fenster "FensterTitel" solange auf den Button ButtonNummer, bis das Fenster "ErwarteterDialog" erscheint
KlickimmerWieder(ButtonNummer, FensterTitel, ErwarteterDialog)
{
;MsgBox %ButtonNummer% %FensterTitel% %ErwarteterDialog%
loop,
{
ControlClick, %ButtonNummer%, %FensterTitel%
WinWait, %ErwarteterDialog%, , 2
IfWinExist, %ErwarteterDialog%
{
break
}
}
return
}
return