I have tried all the ways to write condition if , but it doesn't work.
Code: Select all
Global gs = 9
!r::
gs = 2
return
!s::
ExitApp
!q::
gs = 1
Gosub, TR
return
TR:
while(gs = 1){
PixelGetColor, color, 516, 426
if % color = 0xBD8837 ; green , this condition does work
{
send, {a}
sleep, 300
}else if % color = 0x71CC2E ; blue, this condition does not work
{
send, {d}
sleep, 300
}else{ ; this condition does work
sleep, 1
}
}