Sign in to follow this  
Followers 0
Lithium

Probably a stupid question...

4 posts in this topic

#1 ·  Posted (edited)

I want to know how you select the coordinates when using PixelSearch.

The help file tells me this:

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

left - left coordinate of rectangle.

top - top coordinate of rectangle.

right - right coordinate of rectangle.

bottom - bottom coordinate of rectangle.

What exactly is the left, top, right and bottom of the rectangle?

Is it that 'top' and 'bottom' are y coordinates and 'left' and 'right' are x?

Or maybe I'm completely wrong?

Thanks in advance >_<

Edit: LOL y and x mixed up... I'm pretty tired...

Edited by Lithium

Share this post


Link to post
Share on other sites



Left , top are the coordinates of the left-top corner of the rectangle.

Right-bottom are the coordinates of the Right-bottom corner of the rectangle.

Try something like : 10,10,200,300 .

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I have never used PixelSearch, but it seems you got the x and y coordinates correct. If you run the example script from the help file, it will help you to discover what is happening. The left, top, right and bottom of the rectangle refer to the position of a rectangle on your screen. If you choose left = 0, top = 0, bottom = @DesktopHeight and right = @DesktopWidth, then the whole screen area will be searched.

Edited by czardas

Share this post


Link to post
Share on other sites

Cheers >_

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