The problem is with my incorrect usage of Else If.
Please let me know where I made the mistake.
Thanks,
Muhammadi
Code: Select all
CoordMode, Pixel, Window
ImageSearch, FoundX, FoundY, 334, 456, 416, 491, C:\Users\KILLERWHALE\AppData\Roaming\MacroCreator\Screenshots\Screen_20210531073118.png
Sleep, 1111
If (ErrorLevel)
{
CoordMode, Pixel, Window
ImageSearch, FoundX, FoundY, 330, 459, 419, 510, C:\Users\KILLERWHALE\AppData\Roaming\MacroCreator\Screenshots\Screen_20210531165725.png
CenterImgSrchCoords("C:\Users\KILLERWHALE\AppData\Roaming\MacroCreator\Screenshots\Screen_20210531165725.png", FoundX, FoundY)
Sleep, 1111
}
Else If (ErrorLevel)
{
MsgBox, 0, , A
}
Else
{
MsgBox, 0, , B
}