Target

Description:              This function returns an indication of whether the locator (e.g. mouse) is within a specified screen area.

Returns:                    Boolean

Usage:                       Script or Steady State

Format:                      Target(X1, Y1, X2, Y2)

Parameters:             X1     { numeric }  { required }  { no default: }

                                                Any numeric expression giving the X coordinate on the screen of one side of the screen area ("target").

                                    Y1     { numeric }  { required }  { no default: }

                                                Any numeric expression giving the Y coordinate on the screen of either the top or bottom of the screen area ("target").

                                    X2     { numeric }  { required }  { no default: }

                                                Any numeric expression giving the X coordinate on the screen of the side of the "target" opposite to X1.

                                    Y2     { numeric }  { required }  { no default: }

                                                Any numeric expression giving the Y coordinate on the screen of either the top or bottom of the "target," whichever is the opposite of Y1.

Comments:               This function returns true if the locator position is within the boundaries of the "target" ((X1,Y1) - (X2,Y2)). If the locator is not installed, the function will return false (0).

Example:

If Target(120, 50, 220, 80);

[

   ...

]

This statement will cause the script to execute whenever the mouse passes over the target area.

See Also:

Click | SetXLoc | SetYLoc | XLoc | YLoc