Sign in to follow this  
Followers 0
ljlassi

PixelSearch search direction

6 posts in this topic

I'm making a program where i would need to make PixelSearch search from bottom to top, instead of top to bottom.

AutoIt help file mentions that it can be changed, but does not mention how to change it.

How can i change it?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Just reverse the values.

example searches bottom to top and right to left, i believe.

#include <Array.au3>

$pix = PixelSearch (@Desktopwidth , @DesktopHeight , 0 , 0 , 0x000000)

_ArrayDisplay ($pix)
Edited by iamtheky

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites

does not mention how to change it.

It certainly does

Left-to-Right - left < right

Right-to-Left - right < left

Top-to-Bottom - top < bottom

Bottom-to-Top - bottom < top

The above example searches botom to top, right to left


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

Thanks, This works perfectly

Share this post


Link to post
Share on other sites

It certainly does

The above example searches botom to top, right to left

Ok. I just didnt get it. It can be hard to get for a "newbie", as the help file first tells the parameters should go like this:

"PixelSearch ( left, top, right, bottom, color [, shade-variation [, step [, hwnd]]] )"

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