DragMouse Method

Class

AnyWin class.

Action

Presses a mouse button in a window and drags an object to a target location.

Availability

This functionality is supported only if you are using the Classic Agent.

Syntax

window.DragMouse (iButton, xStart, yStart, xEnd, yEnd, iShiftkeys)
Variable Description
iButton The mouse button to press: Windows: 1 for left, 2 for right, and 3 for center. INTEGER.
xStart Horizontal coordinate relative to current window at which to press mouse button. INTEGER.
yStart Vertical coordinate relative to current window at which to press mouse button. INTEGER.
xEnd Horizontal coordinate relative to current window at which to release mouse button. INTEGER.
yEnd Vertical coordinate relative to current window at which to release mouse button. INTEGER.
iShiftkeys Optional: Specifies one or more shift keys to hold down before beginning the drag operation. The value is interpreted as a bit mask: 1 = Alt key, 2 = Ctrl key, and 4 = Shift key. Default is 0 (no shift keys). INTEGER.

Notes

DragMouse combines the functionality of the BeginDragAt and EndDragAt methods. However, DragMouse operates only within a single window.