Jump to content

Pixel Search


=sinister=
 Share

Recommended Posts

my friend plays runescape, and I want to suprise him with a autominer that im making. I want the script to click a specific color on the screen. I think it has to do with the command "Pixel Search", am I right? So far i have-

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

but I don't know how to make it click the color on the screen. ;) Hope yall can help!

Edited by =sinister=
Link to comment
Share on other sites

Look in the helpfile:

Searches a rectangle of pixels for the pixel color provided.

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

Parameters:

left left    coordinate of rectangle.

top top    coordinate of rectangle.

right right  coordinate of rectangle.

bottom    bottom coordinate of rectangle.

colour    Colour value of pixel to find (in decimal or hex).

shade-variation [optional]  A number between 0 and 255 to indicate the allowed number of shades of variation of the red, green, and blue components of the colour. Default is 0 (exact match).

step [optional]  Instead of searching each pixel use a value larger than 1 to skip pixels (for speed). E.g. A value of 2 will only check every other pixel. Default is 1.

Return Value:

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

Failure: Sets @error to 1 if color is not found.

So using a variable, you can save the coordinates of the color found to an array and then use MouseClick("button",x,y) to click there.

-CMR

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...