Sign in to follow this  
Followers 0
Justforfun

Pixelsearch ?

3 posts in this topic

Hello,

I read somewhere that you can use pixelsearch to search you screen in different directions like have pixelsearch start in the lower right corner and search up and down or right to left and so on istead of always starting in the upper left and searching left to right in a downward motion. Is this true if so how would you put it in code. I have been playing with paint.exe and I have automated it to draw a really cool picture as I cant draw a straight line to save my life ;) and it does good but if I could change the direction that pixelsearch searches I could speed it up 2 to 3 x faster then what it does now. For example when I go to change color if I could start search in the upper right and search right to left in a downward motion I it could find and select the new color alot faster since the color tool bar is in the upper right on the paint window. Thanks in advance for any help.

Share this post


Link to post
Share on other sites



Look at the comments under PixelSearch() in the help file. The search directions depend on what order you list the coordinates in:

Remarks

The search direction varies as follows:

Left-to-Right - left < right

Right-to-Left - right < left

Top-to-Bottom - top < bottom

Bottom-to-Top - bottom < top

So the following will search left-to-right/top-to-bottom:
PixelSearch(100, 125, 400, 525, 0x00FF00)

While the following searches right-to-left/bottom-to-top:

PixelSearch(400, 525, 100, 125, 0x00FF00)

;)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Look at the comments under PixelSearch() in the help file. The search directions depend on what order you list the coordinates in:

So the following will search left-to-right/top-to-bottom:

PixelSearch(100, 125, 400, 525, 0x00FF00)

While the following searches right-to-left/bottom-to-top:

PixelSearch(400, 525, 100, 125, 0x00FF00)

;)

Sorry about the delay thank you for your help works great The full picture took close to 5 minutes before now it appears berfore my eyes in around 50 seconds.

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