bf2forlife Posted July 12, 2008 Share Posted July 12, 2008 (edited) $coord = pixelsearch(0, 0, @DesktopWidth, @DesktopHeight,0x817F77) Mouseclick("left", $coord[0], $coord[1]) So how i could click in random place of that color? Edited July 12, 2008 by bf2forlife Link to comment Share on other sites More sharing options...
rudi Posted July 12, 2008 Share Posted July 12, 2008 $coord = pixelsearch(0, 0, @DesktopWidth, @DesktopHeight,0x817F77) Mouseclick("left", $coord[0], $coord[1]) So how i could click in random place of that color? To do so first of all you need to build an array holding the coordinates of ALL occurrences of pixels of that given shade. As pixelsearch always returns jus the 1st matching pixel's coords, you could break down the screen into single-pixel-lines. Then search these for the 1st occurrence, after that start searching the same line from x+1 to EOL. Then use something like Random(1,$MyPixelArr[0],1) to pick out a random one. Regards, Rudi. Earth is flat, pigs can fly, and Nuclear Power is SAFE! Link to comment Share on other sites More sharing options...
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