It works without the pixelsearch and errorlevel line.
Code: Select all
Loop
{
PixelGetColor, DetectMath, 700, 850
PixelSearch, X, Y, 900, 700, 1200, 900, 0xF4A420
if (DetectMath = 0x36312F)
{
SoundBeep
Pause
}
else if (ErrorLevel = 0)
{
SoundBeep
Pause
}
else
{
Send, test{enter}
Sleep 3000
}
}
return
Code: Select all
Loop
{
PixelGetColor, DetectMath, 700, 850
PixelSearch, VarX, VarY, 900, 700, 1200, 900, 0xF4A420, 15, Fast
if (DetectMath = 0x36312F)
{
SoundBeep
Pause
}
if (ErrorLevel = 0)
{
SoundBeep
Pause
}
else
{
Send, test{enter}
Sleep 3000
}
}
return