Jump to content

PixelSearch, then click.


AKiller
 Share

Recommended Posts

How do i search the pixel and then click it cause its an auto for a game and it moves around..

Pixelsearch (500, 600, 600, 500, 0x969696) - I have no clue if i have that right..

I am new to this so i dont know anything...

AIM = Subbro04

PixelSearch:

Return Value

Success: Returns a two-element array of pixel's coordinates. (Array[0] = x, Array[1] = y)

So, if it finds the pixel, you will have your coords in the array.

Make sure you put it like this in your code:

$array = Pixelsearch (500, 600, 600, 500, 0x969696)

$x = $array[0]

$y = $array[1]

then to click it:

MouseClick ( "left" , $x, $y )

Edited by galpha
Link to comment
Share on other sites

Heh, I got distracted and forgot I was even typing this an hour ago.

It looks fine to me. You need to assign the values the function returns to a variable, though.

You found the pixelsearch function. If you read the help file that comes with it, you should know what to do.

The guy above gives a good example. Also, you could just skip out on the extra variables and do it like this

$array = Pixelsearch (500, 600, 600, 500, 0x969696)

MouseClick ( "left" , $array[0], $array[1] )

Note that array is just the variable name, you could call it anything you want. Autoit will make it an array for you by itself.

Edited by Nevin
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...