Sign in to follow this  
Followers 0
shadowsin

PixelSearch help

5 posts in this topic

I have read the help file on pixelsearch but it doesnt do anything? i opened the example script and it doesnt do anything. what exactly does it do? does it move youre mouse in a certain radious till it finds a certain pixel if so then i cant get it to work :P

Share this post


Link to post
Share on other sites



I have read the help file on pixelsearch but it doesnt do anything? i opened the example script and it doesnt do anything. what exactly does it do? does it move youre mouse in a certain radious till it finds a certain pixel if so then i cant get it to work :nuke:

PixelSearch() does not move the mouse. It silently reads the pixels with calls in the background to Windows APIs, and returns the coordinates of a match programaticly in an array, not by moving anything.

What you do with the coordinates afterwards is up to you. To change the example from the help file link above to move the mouse:

; Find a pure red pixel in the range 0,0-20,300
$coord = PixelSearch( 0, 0, 100, 100, 0xFF0000 )
If @error Then
    MsgBox(16, "Error", "First color not found.")
Else
    MouseMove($coord[0], $coord[1])
EndIf
Sleep(2000) ; 2sec delay

; Find a pure red pixel or a red pixel within 10 shades variations of pure red
$coord = PixelSearch( 100, 100, 200, 200, 0xFF0000, 10 )
If @error Then
    MsgBox(16, "Error", "Second color not found.")
Else
    MouseMove($coord[0], $coord[1])
EndIf
Sleep(2000) ; 2sec delay

:P


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

PsaltyDS is my god thats all i wanted to know and yes i read the help file and everything im not so lazy to just come and ask

Share this post


Link to post
Share on other sites

is there anyway to make it more accurate?

Share this post


Link to post
Share on other sites

nvm i got it messed with the shad variation

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