tom13 Posted May 24, 2008 Share Posted May 24, 2008 When I use PixelSearch it returns me the first match, however I need to check all matches in a specific area. Is there any way to add a count (eg. when count is 2 it returns the second match) so I can make a loop? Link to comment Share on other sites More sharing options...
Bowmore Posted May 24, 2008 Share Posted May 24, 2008 When I use PixelSearch it returns me the first match, however I need to check all matches in a specific area. Is there any way to add a count (eg. when count is 2 it returns the second match) so I can make a loop? You need to use PixelGetColor in a loop to check every pixel. The example below will check every pixel within a 50 x 50 square. If you test a large it won't be very fast. $TestColour = Dec("FF0000") For $i = 250 To 300 For $j = 450 To 500 If $Colour = PixelGetColor( $i , $j ) Then ;Do what you need to do or save the coords to an array EndIf Next Next "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook 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