MouseY Property (Desktop Objects)

Applies to TestComplete 15.47, last modified on January 20, 2023

Description

Use this property to set or get the current screen-relative vertical coordinate of the mouse cursor.

Declaration

TestObj.MouseY

Read-Write Property Integer
TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section

Applies To

The property is applied to the following object:

View Mode

To view this property in the Object Browser panel and in other panels and dialogs, activate the Advanced view mode.

Property Value

An integer value holding the current vertical coordinate of the mouse pointer in pixels.

Remarks

You can use the ScreenToWindow method of the Onscreen object to convert screen-relative coordinates to client area-relative coordinates.

Example

The following examples demonstrate how to use the property to move the mouse cursor:

JavaScript, JScript

Sys.Desktop.MouseY += 50;

Python

Sys.Desktop.MouseY += 50

VBScript

Set d = Sys.Desktop
d.MouseX = d.MouseY + 50

DelphiScript

d := Sys.Desktop;
d.MouseX := d.MouseY + 50;

C++Script, C#Script

Sys["Desktop"]["MouseY"] += 50;

See Also

MouseX Property (Desktop Objects)

Highlight search results