Runite Posted July 6, 2007 Share Posted July 6, 2007 Well, I need a function or something that allows me to find the pixel color of something on the screen. The X and Y coordinates of this pixel are random, so how would I just be able to grab a pixel color from a random place? If someone could please post back here with an answer I would be very grateful. Thanks Link to comment Share on other sites More sharing options...
James Posted July 6, 2007 Share Posted July 6, 2007 Take a look at: Random - To randomly look for a pixel Ubound - Return the size for random PixelGetColor - To get the pixel colour MouseGetPos - For mouse Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Runite Posted July 6, 2007 Author Share Posted July 6, 2007 Ahh, should I look for those in the Function documentation? Thankies Link to comment Share on other sites More sharing options...
James Posted July 6, 2007 Share Posted July 6, 2007 Yes. Anytime. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Runite Posted July 6, 2007 Author Share Posted July 6, 2007 Hmm, I still need some more help on this topic. I can't figure out how to get those all to work together. I know it's easy, but I can't grasp it... Link to comment Share on other sites More sharing options...
Paulie Posted July 6, 2007 Share Posted July 6, 2007 (edited) Hmm, I still need some more help on this topic. I can't figure out how to get those all to work together. I know it's easy, but I can't grasp it...When you say " The X and Y coordinates of this pixel are random, " Is there a specific color that moves randomly around the screen that you are trying to find? If so, then you answer is "PixelSearch()" But to grab A random pixel color from anywhere on your desktop, try something like this: $x = Random( 0, @DesktopWidth,1) ;Random number between 0 and the width of your desktop (in pixels) $y = Random( 0, @DesktopHeight,1) ;Same as above, just with height $color = PixelGetColor($x,$y) ;gets the color of the X,Y Coords and sets "$color" to it Msgbox(0,"Random Color Finder", "Random Coordinate: ("&$x&", "&$y&")"&@CRLF&"Color (Dec): "&$Color&@CRLF&"Color (Hex): 0x"&Hex($Color)) EDIT: btw, I am unable to test atm, but i am pretty confident that it will have no errors. I'm at work Edited July 6, 2007 by Paulie 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