###Function###
PixelSearch

###Description###
Searches a rectangle of pixels for the pixel color provided.

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


###Parameters###
@@ParamTable@@
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.
@@End@@


###ReturnValue###
@@ReturnTable@@
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.
@@End@@


###Remarks###
The search is performed left-to-right, top-to-bottom and the first match is returned.

Earlier versions of AutoIt (prior to v3.0.102) used the BGR format for defining color - newer versions use RGB by default but this can be changed using the ColorMode option.

Remember, a typical display at 1024 x 768 has 786432 pixels. Although PixelSearch is optimized, narrowing the search area helps speed up the result.


###Related###
ColorMode (Option), PixelChecksum, PixelGetColor, PixelCoordMode (Option)


###Example###
@@IncludeExample@@
