Jump to content
Sign in to follow this  
pezo89

how can i search for a pixel within a X & Y cords?

Recommended Posts

pezo89

anyone know,

managed to write this, however how can i get it to search in X & Y cords?

$coord = PixelSearch( 0, 0, 0, 0, 4210849,50 )

Share this post


Link to post
Share on other sites
weaponx

What do you think the first four parameters are for PixelSearch?

Share this post


Link to post
Share on other sites
MrMitchell

Are you trying to get it to search a specific place on the screen? It looks like you've got it searching nothing right now, all those zeroes specify your rectangle to search.

PixelSearch(left, top, right, bottom, color). I'm no PixelSearch expert or anything so maybe I'm way off, but that's just what it looks like to me...

Share this post


Link to post
Share on other sites
pezo89

Are you trying to get it to search a specific place on the screen? It looks like you've got it searching nothing right now, all those zeroes specify your rectangle to search.

PixelSearch(left, top, right, bottom, color). I'm no PixelSearch expert or anything so maybe I'm way off, but that's just what it looks like to me...

true, but then again, to set a point on the screen u need X and Y right?. so how do u get those 4 points?. -> 0, 0, 0, 0

Share this post


Link to post
Share on other sites
MrMitchell

AutoIt Window Info Tool?

Add: The executable is Au3Info.exe. Open it up and go to either the Mouse Tab or Summary Tab when then move your mouse to where you want to get the coords. 0,0 by default is the top left corner of the screen if I'm not mistaken. Left to right goes from X = 0 to @DesktopWidth and top to bottom is y = 0 To @DesktopHeight. I hope that's right and hope it helps ^_^

Edited by MrMitchell

Share this post


Link to post
Share on other sites
Valuater

Where did you find the command??

Help says

PixelSearch ( left, top, right, bottom...

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites
Qousio

The top left corner of your screen is 0,0 and the bottom right is whatever resolution the current application is using. So if you're using a program that enitiates 1280x1024 pixel resolution and you would need to search for a pixel in the middle of your screen, it would be pixelsearch(640, 512, 640, 512 .....). If you need to find a certain pixel try using MouseGetPos().

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  

×