Jump to content

Help with PixelGetColor


YaBoy
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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
Link to comment
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?

Link to comment
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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...