Find Pixel
Verb: findPixel
Available from: <Standard>
Finds and positions the mouse cursor over a specific pixel according to the color and coordinates set.
Syntax
findPixel --color(String) [--foregroundwindowonly(Boolean)] --region(Rectangle) (Point)=value
Inputs
Script | Designer | Required | AcceptedTypes | Description |
---|---|---|---|---|
--color | Color | Required | Text | The color of the pixel written in hexadecimal. |
--foregroundwindowonly | Search in foreground window | Optional | Boolean | When enabled, looks for the pixel only in the foreground window. |
--top | Top(Obsolete) | Optional | Number | Defines the top coordinates of the region that should be used for searching for the pixel.
This parameter is obsolete, use the Region parameter instead. |
--left | Left(Obsolete) | Optional | Number | Defines the left coordinates of the region that should be used for searching for the pixel.
This parameter is obsolete, use the Region parameter instead. |
--width | Width(Obsolete) | Optional | Number | Defines the width of the region that should be used for searching for the pixel.
This parameter is obsolete, use the Region parameter instead. |
--height | Height(Obsolete) | Optional | Number | Defines the height of the region that should be used for searching for the pixel.
This parameter is obsolete, use the Region parameter instead. |
--region | Region | Only whenSearch in foreground window is False | Rectangle | Region where the pixel should be searched on.
The region selector can be used to indicate the position in the screen where the pixel is to be analyzed. |
Outputs
Script | Designer | AcceptedTypes | Description |
---|---|---|---|
value | Point | Point | Returns the point on the screen where the pixel was found. |
Example
Searches for the Point of a pixel specified by the color "#59C894" on a web page.
defVar --name PixelPoint --type Point
defVar --name chromeWindow --type Window
webStart --name web01 --type "Chrome"
webNavigate --url "https://www.google.com/search?q=%2359C894&rlz=1C1GCEU_enBR849BR849&oq=%2359C894&aqs=chrome..69i57.552j0j7&sourceid=chrome&ie=UTF-8"
findPixel --color "#59C894" --region "175,263,149,147" PixelPoint=value
webClose --name web01 --leavebrowseropen
logMessage --message "Point where it was found: ${PixelPoint}" --type "Info"
// Returns the position on the screen where the pixel is at.