I did this example to be able to understand thank you right now because it is the most like my script in a reduced version
Code: Select all
#NoEnv
#SingleInstance Force
#MaxHotkeysPerInterval 99000000
#HotkeyInterval 99000000
#KeyHistory 0
CoordMode, Pixel, Screen
CoordMode, Mouse, Screen
SendMode Input
SetBatchLines -1
Gui, Add, Button, x32 y20 w70 h30 gStart, Button
Gui, Add, Progress, x132 y20 w160 h20 vStart, 25
; Generated using SmartGUI Creator for SciTE
Gui, Show, w479 h379, Untitled GUI
return
Start:
loop
{
Gui, Submit, NoHide
ImageSearch, FoundX, FoundY, 1192, 26, 1299, 136, mark1.png
(ErrorLevel = 1)
{
MsgBox, no 1
Sleep, 2000
}
ImageSearch, FoundX, FoundY, 1233, 71, 1255, 89, mark2.png
if (ErrorLevel = 1)
{
goto, a
}
a:
Gui, Submit, NoHide
ImageSearch, FoundX, FoundY, 1192, 26, 1299, 136, mark3.png
(ErrorLevel = 1)
{
MsgBox, no 3
Sleep, 2000
}
ImageSearch, FoundX, FoundY, 1233, 71, 1255, 89, mark4.png
if (ErrorLevel = 1)
{
MsgBox, no 4
Sleep, 2000
}
}
return
GuiClose:
ExitApp