Get Pixel Color

Use this option to obtain the pixel color underneath the tip of the mouse cursor. The pixel color is assigned a numeric value by windows, normally 6 - 8 digits in length. This numeric value is then saved to an integer variable such as N1.
Underneath Mouse
This option will get the pixel color of the pixel located directly underneath the mouse pointer. The pixel color is obtained wherever the mouse cursor is located at the time this command takes place during the macro.
At Specific Coordinates
With this option you assign the specific mouse coordinates based on the active window or the entire screen.
Relative to Screen
With this option checked you are telling the macro to move the mouse cursor relative to its position on the computer screen. You would use the "Screen Coordinates" numbers from the Mouse Locator with this option.
Relative to Window
With this option checked you are telling the macro to move the mouse cursor relative to its position within the window that is active. You would use the "Active Window" numbers from the Mouse Locator with this option.
Launch Mouse Locator
The mouse locator is an easy way to obtain the pixel coordinates if you selected the At Specific Coordinates option. If the Mouse Locator window pops up in an area of your screen that covers important data, click on the window, hold the left mouse button down on the blue bar at the top of the window and drag to another area of your screen.
Additional Information and Screenshot

Screen Position
The set of numbers directly under Screen Position lists the position of the mouse relative to your computer screen. As you move the mouse, you will notice the numbers changing in relation to the mouse cursor position. The number to the left is the X coordinate, or how many pixels from the left edge of the screen. The number on the right is the Y coordinate, or how many pixels the mouse is positioned from the top of the screen.
Active Window
The set of numbers directly under Active Window lists the position of the mouse relative to the active window or the window that has the focus. When first activating the Mouse Locator window, it will have the focus. Clicking on a window outside of the Mouse Locator will bring focus to that window. The Mouse Locator window will remain on top so that you can read the coordinates for the window you want to use. As you move the mouse, you will notice the numbers changing in relation to the mouse position. The number to the left is the X coordinate, or how many pixels the mouse is positioned from the left edge of the active window. The number on the right is the Y coordinate, or how many pixels the mouse is positioned from the top of the active window.
Integer Variable
Assign the variable to the pixel color obtained.
Example
Let's take a look at how this could be used. We'll create a hypothetical example. There is a web site that uses two alternating graphical images, one red and the other green. We want to get the pixel color of the red image. So we would first load the web page. Use the Get Pixel Color command and select the At Specific Coordinates option, Relative to Screen. Then launch the mouse locator from the Get Pixel Color window. Position the mouse cursor over the red image and press Ctrl Space. This inserts the pixel coordinates to the Get Pixel Color window. Write down the Pixel color on a piece of paper because we'll need this information later. Click OK to save.
With this information we can build the rest of the macro. What we want to do is insert a password if the image is red. If the image is not red (because the green image is currently displayed), we want to open a new web page.
Macro Script
Get Pixel
If Variable %N1% = 255
Text Type: <TAB> 123xyz
Else
Web Site: http://www.macros.com
End If
The pixel color for red is 255. This is the value we wrote down on the piece of paper so we could remember it for the If Variable command. So what we have done is use the If Variable command, stating if Variable N1 (what we assigned to the pixel color) equals a value of 255, then press a Tab and type in the password of 123xyz. If we run the macro and the red graphical image is not there, then N1 will have a different value (a value for green). It will not match the value of 255 in the If Variable statement. So it will skip the Text Type command and launch the www.macros.com web page instead.
Get Pixel Color
If Variable %N1% = 255
Text Type: <TAB> 123xyz
Else
Web Site: http://www.macros.com
End If
