I want verify a pixel color but I dont want to wait 0.1 I found this code example
WaitPixelColor(0.1 0xE7E7DE 762 435)
how can I verify the pixel color without waiting 0.1
Posts: 12,087
Threads: 142
Joined: Dec 2002
int color=pixel(762 435)
if(color=0xE7E7DE)
,...
ok that works. if the pixel color does not verify how do i do a "err goto"
Posts: 12,087
Threads: 142
Joined: Dec 2002
pixel() throws error if point is outside screen or window, or window not found.
int color=pixel(x y); err goto error
if(color=0x123456)
,out "good color: 0x%X" color
else
,out "bad color: 0x%X" color
;error
out "error"
can you tell me how to do this
int color=pixel(528 90); err goto error
if(color=0x5294D6)
,out "good color: 0x%X" color
else
,out "bad color: 0x%X" color
;error
out "error"
lef 528 90
i want to skip the "lef 528 90" on err
thank you very much for helping me
Posts: 12,087
Threads: 142
Joined: Dec 2002
To skip on error:
int color=pixel(528 90); err goto g1
lef 528 90
;g1
...
To skip if doesn't match:
if(pixel(528 90)=0xE7E7DE)
,lef 528 90
...
I try this but it did not work its still does the lef 529 86 even if it err
int color=pixel(529 86); err goto g1
if(color=0x5294D6)
,out "good color: 0x%X" color
else
,out "bad color: 0x%X" color
;error
out "error"
lef 529 86
g1
Posts: 12,087
Threads: 142
Joined: Dec 2002
Then it isn't error, but simply color doesn't match. Use second example from my last message.
thank you it works great :wink: