Skip to content

Instantly share code, notes, and snippets.

@sftblw
Last active August 26, 2016 04:46
Show Gist options
  • Save sftblw/dbb3eaa96b2b75a3b1c1 to your computer and use it in GitHub Desktop.
Save sftblw/dbb3eaa96b2b75a3b1c1 to your computer and use it in GitHub Desktop.
nextguy.ahk for next next next
loop
{
coordmode, pixel, screen
coordmode, mouse, screen
x = 0
y = 0
wingetpos, x, y, width, height, safetycare.co.kr
;tooltip, %x% %y%
imagesearch, , , x+797, y+652, x+1000, y+750, next.png
if errorlevel = 0
{
tooltip found: next
winactivate, safetycare.co.kr
sleep, 500
mouseclick, left, x+928, x+710
}
if errorlevel = 1
{
tooltip
}
if errorlevel = 2
{
tooltip error: next
}
sleep, 500
imagesearch, , , x+496, y+418, x+727, y+498, ok.png
if errorlevel = 0
{
tooltip found: ok
winactivate, safetycare.co.kr
sleep, 500
mouseclick, left, x+614, x+448
}
if errorlevel = 1
{
tooltip
}
if errorlevel = 2
{
tooltip error: ok
}
sleep, 500
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment