Pixel Search

Searches a region of the screen for a pixel color.

Pixel Search (F7)

Parameters

Start X/Y / End X/Y
Defines the Search area of the screen/window.
Color Picker
Opens the Color Picker Tool. Point the mouse to the desired location and Right-Click to get the pixel code (in RGB format).
ColorID
The decimal or hexadecimal color ID to search for, in Blue-Green-Red (BGR) format. This field accepts Variables & Expressions.
Search
Opens the Windows Color Pick dialog to select a pixel color.
If found
Selects an action to execute when an image/pixel is found.
To execute a different action Select 'Continue' (or 'Break' to exit the command's loop) and use the 'If Image/Pixel Found' option in the If Statements window.
If not found / Error
Selects an action to execute when an image/pixel is not found or if the command finds an error.
To execute a different action Select 'Continue' (or 'Break' to exit the command's loop) and use the 'If Image/Pixel Not Found' option in the If Statements window.
Add "If Statement"
Automatically adds an If Image/Pixel Found statement below the command. You may select a range of rows to be wrapped by the statement block.
Preview
Previews the selected pixel to search.
Variables
Names of the Output variables where to store the X and Y coordinates when found.
Adjust coordinates to the center of the image
Check this option to automatically correct the coordinates in the output variables to the center of the image, instead of the upper-left corner.
Coord
Sets coordinate mode for the search to be relative to either the active window or the screen.
Variations
Specify for n a number between 0 and 255 (inclusive) to indicate the allowed number of shades of variation in either direction for the intensity of the red, green, and blue components of each pixel's color.
Fast
Uses a faster searching method that in most cases dramatically reduces the amount of CPU time used by the search.
RGB
Causes ColorID to be interpreted as an RGB value instead of BGR. This option affects the Color Picker Tool but the retrieved color will be reversed in preview and Color Pick Dialog.
Repeat until
Loops the command until the image is found or not found, according to the option selected.
When this option is checked you can use the Repeat counter to define the maximum number of times to search. If Repeat is 1, it will loop indefinitely until the image is found/not found or the user stops execution. And if it's a number higher than 1 or a variable, it will loop until the image is found/not found but no more than that number.

Remarks

You may use the variables %FoundX% and %FoundY% (or the ones defined by you) in other commands like Mouse Move & Click when the image/pixel is found. To save the values to a different variable or increment the values, use the Variables window.

PixelSearch