Code: Select all
loop
{
; check if its in za warudo then find a b c d e
CoordMode, Pixel, Window
PixelSearch, FoundX, FoundY, 981, 1012, 981, 1012, 0x3FDE45, 0, Fast RGB
If ErrorLevel = 0
{
;Check a
CoordMode, Pixel, Window
PixelSearch, FoundX, FoundY, 1626, 1007, 1626, 1007, 0x3FDE45, 0, Fast RGB
If ErrorLevel
{
Send, {3 down}
Sleep 20
Send, {3 up}
sleep, 3500
}
sleep, 250
}
; check b
CoordMode, Pixel, Window
PixelSearch, FoundX, FoundY, 1792, 975, 1792, 975, 0x3CD241, 20, Fast RGB
If ErrorLevel
{
Send, {5 down}
Sleep 20
Send, {5 up}
sleep, 3500
}
; check c
CoordMode, Pixel, Window
PixelSearch, FoundX, FoundY, 1601, 975, 1601, 975, 0x3FDE45, 5, Fast RGB
If ErrorLevel = 0
{
Send, {4 down}
Sleep 20
Send, {4 up}
sleep, 5500
}
sleep, 250
; check d
CoordMode, Pixel, Window
PixelSearch, FoundX, FoundY, 406, 1007, 406, 1007, 0xD3704C, 0, Fast RGB
If ErrorLevel = 0
{
Send, {7 down}
Sleep 20
Send, {7 up}
sleep 200
Send, {8 down}
Sleep 20
Send, {8 up}
sleep, 7200
}
sleep 150
; check e
CoordMode, Pixel, Window
ImageSearch, FoundX, FoundY, 1649, 1018, 1834, 1055, *20 e.png
If ErrorLevel = 0
{
Send, {9 down}
Sleep 20
Send, {9 up}
sleep, 1600
}
sleep 550
}
first it will find the pixel the world
if its found, it will search pixel a, b, c, d, e
A and B ------- ErrorLevel
while
C, D ,and E ---- ErrorLevel = 0
the A and B is pressing the even even tho the pixel was found, C D and E perfectly works.
Can anyone why the A and B pixelsearch is pressing they keys even tho the pixel is found ?