MoveMouse Method

Class

AnyWin class.

Action

Moves the pointer to the specified location in the window.

Syntax

window.MoveMouse ([iXpos, iYpos, bRawEvent])
Variable Description
iXpos Optional: The horizontal coordinate (relative to the current window) of the new location. You must also specify iYpos if you specify iXpos. The default is 0. INTEGER.
iYpos Optional: The vertical coordinate (relative to the current window) of the new location. The default is 0. INTEGER.
bRawEvent Optional: 32-bit Windows only. Used to specify playback method. The Open Agent ignores this value regardless of what is specified in the script. BOOLEAN.

Notes

MoveMouse is a low-level method that most scripts do not have to call. In general, when interacting with an application, you use the Click method to move and click the mouse, or a method designed to perform the action desired, such as Pick to pick a menu item.

You can use MoveMouse to test Web applications, Win32 applications, and Windows Forms applications that use mouse move events, but not to test child domains of the xBrowser technology domain, for example Apache Flex and Swing.

If coordinates are specified, the mouse pointer is moved to those coordinates relative to the client area of the window (that is, the window’s internal area, excluding its caption, menu bar, and border). If you do not specify the coordinates, the mouse pointer is moved to the top-left corner (0, 0) of the client area of the window.

MoveMouse() is not available for the Menu and MenuItem classes.

Example

DialogBox.DrawingArea.MoveMouse (10, 30)