YaBoy Posted January 26, 2007 Posted January 26, 2007 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?
qwqwwqwdwd Posted January 26, 2007 Posted January 26, 2007 (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 January 26, 2007 by qwqwwqwdwd
YaBoy Posted January 26, 2007 Author Posted January 26, 2007 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?
qwqwwqwdwd Posted January 26, 2007 Posted January 26, 2007 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.
YaBoy Posted January 28, 2007 Author Posted January 28, 2007 (edited) its done Edited January 31, 2007 by YaBoy
YaBoy Posted January 28, 2007 Author Posted January 28, 2007 (edited) its done Edited January 31, 2007 by YaBoy
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now