Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I want verify a pixel color
#1
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
#2
Code:
Copy      Help
int color=pixel(762 435)
if(color=0xE7E7DE)
,...
#3
ok that works. if the pixel color does not verify how do i do a "err goto"
#4
pixel() throws error if point is outside screen or window, or window not found.

Code:
Copy      Help
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"
#5
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
#6
To skip on error:

Code:
Copy      Help
int color=pixel(528 90); err goto g1
lef 528 90
;g1
...

To skip if doesn't match:

Code:
Copy      Help
if(pixel(528 90)=0xE7E7DE)
,lef 528 90
...
#7
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
#8
Then it isn't error, but simply color doesn't match. Use second example from my last message.
#9
thank you it works great :wink:


Forum Jump:


Users browsing this thread: 2 Guest(s)