Changed quicksearch to hash table

This commit is contained in:
2022-08-19 18:46:11 +01:00
parent b1084a736b
commit a12254aff1
5 changed files with 730 additions and 18 deletions

View File

@@ -44,4 +44,28 @@ CenterImgSrchCoords(File, ByRef CoordX, ByRef CoordY)
CoordX += LoadedPicW // 2
CoordY += LoadedPicH // 2
ErrorLevel := LastEL
}
FindAndClickCenterOfImage(ImagePath, ErrorMessage:="Image Not Found")
{
CoordMode, Pixel, Screen
MsgBox,,, %ImagePath%
Sleep 500
ImageSearch, FoundX, FoundY, 0, 0, 2560, 1440, ImagePath
MsgBox,,, %FoundX%
Sleep 500
CenterImgSrchCoords(ImagePath, FoundX, FoundY)
If ErrorLevel
{
MsgBox, 49, Continue?, %ErrorMessage%`n`nPress OK to continue function.
IfMsgBox, Cancel
Return
}
If (ErrorLevel = 0)
{
CoordMode, Mouse, Screen
Click, %FoundX%, %FoundY% Left, 1
Sleep, 10
SendRaw, %EPSPin%
}
}