Jump to content
Sign in to follow this  

Pixelsearch help please!

Recommended Posts


Hi, I need a pixelsearch to scan a 240 x 240 window but in boxes of 60 x 60 at a time until it gets to the end.

---[Help 1]---

For example:

I have a 240 x 240 window.

(With x and y being the origins...)

It starts the scan at x1 y1. Then when that scan is over, it will move horizontally to the next scan....

The next scan would be x61 y1.

Then x121 y1 and x181 y1.

Once the horizontal is done it should start back from the left but this time y being 61.

You should see what I am aiming for now.

---[Help 2]---

I did have this working by using a 60 x 60 splashimage, but each time the splash image moved to the spot the pixel was that needed clicked, the mouse would click the splash image, and with the splashimage being a window, the splashimage would take the focus and that pixel that was supposed to be clicked wouldn't get clicked. I also tryed using @SW_HIDE before the mouseclick took place, but by the time the window was hidden the pixel had moved to another spot and the program had to start scanning again.

If someone could tell me how to get this to work the way I descibed first (Help 1), please do. If not, then is there a way to make the splashimage (Help 2) to not get the focus when clicked?

Please help, thanks :P!

Share this post

Link to post
Share on other sites

PixelsSearch() requires 4 coords... can you give an example of what the very first PixelSearch() and the very last PixelSearch() would look like? You only give one set of x and y coords.

PixelSearch(1, 1, ?, ?, ?color)


For $x = 1 To 4
    $Search = PixelSearch(60 * ($x - 1) + 1, 1, ($x * 60) + 1, 1, 0xFF0000)
    If Not @error And IsArray($Search) Then
;do something
For $y = 1 To 4
    $Search = PixelSearch(1, 60 * ($y - 1) + 1, 1, ($y * 60) + 1, 0xFF0000)
    If Not @error And IsArray($Search) Then
;do something

I don't know if this is what you want... but it moves like I understand your posted question.


Did you try to do something like:


;Found Pixel


WinActivate('Window you found the pixel in')

;do action

SplashImageOn("") ?

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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