AIObject properties

Object properties can be retrieved from the application using the GetObjectProperty and GetAllProperties methods. You can then use the properties to check the object's location or content.

The AIObject test object supports the properties listed in the table below.

Property Name

Description

abs_x

The object's absolute x-coordinate (left) relative to the screen (in pixels). 0,0 is always the top-left corner of the (primary) monitor.

If you are working with multiple monitors, the coordinate in the secondary monitor is relative to the primary monitor.

For example, given a resolution of 1280 x 1024 in the primary monitor, if the secondary monitor is positioned to the right of the primary monitor, the x-coordinate is 1280 or greater. If the secondary monitor is placed to the left of the primary monitor, the x-coordinate is negative.

abs_y

The object's absolute y-coordinate (top) relative to the screen (in pixels). 0,0 is always the top-left corner of the (primary) monitor.

If you are working with multiple monitors, the coordinate in the secondary monitor is relative to the primary monitor.

For example, given a resolution of 1280x1024 in the primary monitor, if the secondary monitor is positioned below the primary monitor, the y-coordinate is 1024 or greater. If the secondary monitor is placed above the primary monitor, the y-coordinate is negative.

confidenceThe level of certainty with which AI identified this control, in percentage.
Control_classThe type of control that was identified.

height

The object's height (in pixels).

hintAn instruction or example indicating the type of content to enter for the value of a control, for example, a grayed out string inside a text box.

name

The object's name.

state

The state of a check box or toggle button.

Possible values: On or Off.

textThe text used to identify the control.
value

The text contained in the control.

Relevant for edit boxes, text boxes, and combo boxes.

width

The object's width (in pixels).

x

The object's x-coordinate (left) relative to the frame (in pixels).

y

The object's y-coordinate (top) relative to the frame (in pixels).

See also: