Code: Select all
#IfWinActive ahk_class GLFW30
dir = %A_ScriptDir%
!2::
continueWalk = True
while continueWalk
{
Send, {a down}
Sleep, 1000
Send, {a up}
Send, {d down}
Sleep, 1000
Send, {d up}
}
Loop
{
CoordMode, Pixel, Window
ImageSearch OutputVarX, OutputVarY, 149, 157, 197, 173, %dir%\test.png
If ErrorLevel = 0
MsgBox, test completed
continueWalk = False
}
return