Sign in to follow this  
Followers 0
YaBoy

Help with PixelGetColor

6 posts in this topic

I would like to write some code that if the color is: FFD767 then it would go ahead and click on something.

Also, I want it so only proceed if the color is FFD767. For example, if the mouse clicks something, it will wait until it see's that color, if it doesnt it will wait until it does. Can anyone help me with that?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I would like to write some code that if the color is: FFD767 then it would go ahead and click on something.

Also, I want it so only proceed if the color is FFD767. For example, if the mouse clicks something, it will wait until it see's that color, if it doesnt it will wait until it does. Can anyone help me with that?

Dim $Loop = 0
Do
    $PixelSearch    =   PixelSearch(xx, yy, lxx, kyy, 0xFFD767)
    
    If Not $PixelSearch = 1 Then
      ; write ur command here if it dectect that color
    EndIf
Until $Loop = 1
Edited by qwqwwqwdwd

Share this post


Link to post
Share on other sites

Dim $Loop = 0
Do
    $PixelSearch    =   PixelSearch(xx, yy, lxx, kyy, 0xFFD767)
    
    If Not $PixelSearch = 1 Then
     ; write ur command here if it dectect that color
    EndIf
Until $Loop = 1
Whats the, PixelSearch(xx, yy, lxx, kyy) < whats all those letters mean?

Also I only want the Pixel thing to come in when it clicks in that one area.

For Example:

Mouse Clicks, then if the pixel is that color it will then move on to the next code. Then I will do some more mouseclicking like 6 times. Then it will go back to the "Mouse Click, proceed if Pixel is that color".

So use that code that you gave me? The loop?

Share this post


Link to post
Share on other sites

Whats the, PixelSearch(xx, yy, lxx, kyy) < whats all those letters mean?

Also I only want the Pixel thing to come in when it clicks in that one area.

For Example:

Mouse Clicks, then if the pixel is that color it will then move on to the next code. Then I will do some more mouseclicking like 6 times. Then it will go back to the "Mouse Click, proceed if Pixel is that color".

So use that code that you gave me? The loop?

read the helpfile

PixelSearch ( left, top, right, bottom, color [, shade-variation][, step]] )

Parameters

left =left coordinate of rectangle.

top =top coordinate of rectangle.

right =right coordinate of rectangle.

bottom= bottom coordinate of rectangle.

color =Color value of pixel to find (in decimal or hex).

shade-variation= [optional] A number between 0 and 255 to indicate the allowed number of shades of variation of the red, green, and blue components of the colour. Default is 0 (exact match).

step =[optional] Instead of searching each pixel use a value larger than 1 to skip pixels (for speed). E.g. A value of 2 will only check every other pixel. Default is 1.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

its done

Edited by YaBoy

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

its done

Edited by YaBoy

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0