MultiClick Method

Class

AnyWin class.

Action

Generates multiple mouse clicks on the window.

Syntax

window.MultiClick (iCount [,iButton,iXpos,iYpos,bRawEvent])
Variable Description
iCount The number of clicks to generate (1, 2, or 3). INTEGER.
iButton Optional: The mouse button to press: Windows: 1 for left (default), 2 for right, and 3 for center. INTEGER.
iXpos Optional: The horizontal coordinate (relative to the window) at which to click. If not specified, the click will occur on the far left side of the window’s area (iXpos = 0). INTEGER.
iYpos Optional: The vertical coordinate (relative to the window) at which to click. If not specified, the click will occur on the top of the window (iYpos = 0). Specify iYpos if you specify iXpos, otherwise omit it. INTEGER.
bRawEvent 32-bit Windows only. Optional. Used to specify playback method. The Open Agent ignores this value regardless of what is specified in the script. BOOLEAN.

Notes

MultiClick performs iCount mouse clicks in the client area of the window (that is, the window’s internal area, excluding its caption, menu bar, and border). The click speed is automatically adjusted so that the application can recognize the click events, no matter what the mouse delay is set to.

If you do not specify iXpos and iYpos, the clicks occur in the top-left corner of the window’s client area (0,0).

By default, Silk Test Classic verifies that the coordinates fall within the window, and raises the exception E_COORD_OUTSIDE_WINDOW if they are not. You can override this default with the OPT_VERIFY_COORD option, which you set with SetOption.

Example

DialogBox.Elements.MultiClick (2, 1, 10, 30)