WinXLoc

(Engine-Level Function)

Description: Returns the X coordinate of the locator (mouse) for a window.
Returns: Numeric
Usage: Script or steady state.
Related to: WinLocSwitch | WinYLoc | XLoc | YLoc | GUITransform
Format: WinXLoc(Object)
Function Groups: Graphics,  Locator,  Window
Parameters:  
Object   
Required. Any expression that gives the object value of any module instance which is drawn in the window.
Comments:

Returns the location of the mouse for a particular window. If the mouse is not over that window, it retains the value from the last time that the mouse was over that window. If the window that the mouse is over is a child window, a WinXLoc/WinYLoc statement in the parent will register the same values as one in the child. That is, the coordinate position in the child window. Similarly, when the mouse is moved over the parent, the values for WinXLoc/WinYLoc in both the parent and child windows will be the same. That is, the location of the mouse in the parent window.

Note: This function is disabled when using a GUITransform as a GUIStrectch.

Example:

If Change(WinXLoc(myWin), 0) || Change(WinYLoc(myWin), 0);
[
  ... 
]

This statement checks for any movement of the mouse in the window designated by myWin and executes the script when it occurs.