MouseCoords

Returns coordinates of the mouse within a window.

Syntax:

MouseCoords( parent-windowname, child-windowname)

Parameters:

(s) parent-windowname  the initial part of, or an entire parent window name.

(s) child-windowname the initial part or, or an entire child window name.

Returns:

(s)  the x and y coordinates of the mouse cursor, relative to the window specified by "win-name" and "child-win".

 

If "parent-windowname" specifies a top-level window and "child-windowname" is a blank string, the specified X-Y coordinates are relative to "parent-windowname".

If "parent-windowname" specifies a top-level window and "child-windowname" specifies a child window of "parent-windowname", the specified X-Y coordinates are relative to "child-windowname".

If "parent-windowname" and "child-windowname" are both blank strings, the specified X-Y coordinates are relative to the Windows desktop.

All coordinates are based on a virtual 1000 x 1000 screen.

Note: The size and shape of displayed windows are usually based on a combination of screen resolution and the system font size. Thus the x and y coordinates may be different on each individual machine.

 

Example:


coords=MouseCoords("", "")
Message("Coordinates are relative to the Windows desktop.",coords)
Exit
See Also:

MouseClick, MouseClickBtn, MouseInfo, SendKey