New to AutoHotkey and I cannot figure out what I am doing wrong here. From the ToolTip it is clear that I have 4 numbers that should work for Image Search, but the ErrorLevel is always 2.
Code: Select all
MouseX:=non
MouseY:=non
TopLeftX:=non
TopLeftY:=non
BottomRightX:=non
BottomRightY:=non
#Persistent
SetTimer, WatchCursor, 100
return
WatchCursor:
MouseGetPos, MouseX, MouseY
TopLeftX := MouseX-100
TopLeftY := MouseY+200
BottomRightX := MouseX+100
BottomRightY := MouseY
ImageSearch, OPX, OPY, %TopLeftX%, %TopLeftY%, %BottomRightX%, %BottomRightY%, Image.JPG
test=%ErrorLevel%
ToolTip, %TopLeftX% %TopLeftY% %BottomRightX% %BottomRightX% %ErrorLevel%
Cheers!
-S