I need to find a code for AHK to recognize when a "Loading Bar" or in this case an "HP Bar"
Be low (20%)
And if so, click on the assigned coordinates.
...
But the "ImageSearch" command only recognizes still images, and I can't find a way to see it when the "HP Bar" is below X%
This is my code:
Code: Select all
#SingleInstance force
MsgBox,, [WIP] Auto LastHit [WIP],
(
Comandos:
Shift + 1 = ON
Shift + 2 = OFF
Shift + 0 = EXIT
)
+1:: ; ////////////
$stop := 0
loop {
if ($stop)
{
return
}
ImageSearch, foundX, foundY, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, HPBAR.png
If(ErrorLevel == 0){
foundX:=foundX+200 ; BLA BLA
foundY:=foundY+200 ; BLA BLA
Click, %foundX%, %foundY% ; BLA BLA
}
}
+2:: ; ///////////
$stop := 1
return
+3:: ; //////////
ExitApp