I am using snipping tool to capture .png of image, i can't use PixelSearch because all of the buttons i need to click have the same color font and no distinctive color.
With ErrorLevel = 0 there is no in between, how can i make it have a confidence level, something like.......
IF ConfidenceLvl=90
Click,
Else Continue
Please help me make my script better.
Code: Select all
f1::
CoordMode, Pixel, Screen
CoordMode, Mouse, Screen
Loop
{
Sleep, 500
ImageSearch, FoundX, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, C:\Scripting\exampleimage.PNG
If (ErrorLevel = 0)
{
FoundX := FoundX + 10
FoundY := FoundY + 20
Click, %FoundX%, %FoundY%
Sleep, 500
}
}
return
z::pause