Sign in to follow this  
Followers 0
Bobs16

Help with PixelSearch

4 posts in this topic

Ok $coord = PixelSearch( 100, 100, 1024, 718, 0xFF8000, 1, 2)

SO it starts at (100,100) and searches to (1024,718) but does it go left to right or does it go in a straight line? I hope this makes sense if not I will try to re word it.

Share this post


Link to post
Share on other sites



I'm almost certain it goes in from left to right. If no pixels are found in that row, it moves to the next row.

In your case, it will search a pixel and skip 2 and then move on.

Share this post


Link to post
Share on other sites

Ya that is exactly what I was thinking thank you very much.

Share this post


Link to post
Share on other sites

Ok $coord = PixelSearch( 100, 100, 1024, 718, 0xFF8000, 1, 2)

SO it starts at (100,100) and searches to (1024,718) but does it go left to right or does it go in a straight line? I hope this makes sense if not I will try to re word it.

from helpfile:

Remarks

The search is performed left-to-right, top-to-bottom and the first match is returned.

Earlier versions of AutoIt (prior to v3.0.102) used the BGR format for defining color - newer versions use RGB by default but this can be changed using the ColorMode option.

Remember, a typical display at 1024 x 768 has 786432 pixels. Although PixelSearch is optimized, narrowing the search area helps speed up the result.

helpfile is your bestfriend

Share this post


Link to post
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
Sign in to follow this  
Followers 0