UVK scripting commands - ClassNN control definition

Show menu

ClassNN control definition

Each time you call the ->WaitControl(), ->WaitControlState(), ->ClickControl() or ->ControlSend() functions, you need to identify the control you want to interact with. This is done through the ClassNN/ID parameter.

This parameter can simply be the text you see displayed in the control, such as OK or Cancel, it will work for most controls like buttons or checkboxes.

However, it may not be the best way to identify a control, because there may be more than one control with the same text, and some controls don't display any text at all (they may display an image, for instance).

In that case, a special description can be used as the ClassNN/ID parameter. This description can be used to identify a control by the following properties:

ID - The internal control ID. The Control ID is the internal numeric identifier that windows gives to each control.
TEXT - The text on a control, for example Next on a button
CLASS - The internal control classname such as Edit or Button
CLASSNN - The ClassnameNN value, such as Edit1
INSTANCE - The 1-based instance when all given properties match.

One or more properties are used in the ClassNN/ID parameter of a control function in the format:

[PROPERTY1:Value1; PROPERTY2:Value2]

Note: if a Value must contain a ";" (semi-colon) or a "," (coma), it must be doubled.

The example below shows several ways to click a control with the following properties:TEXT:OK, CLASS:Button, INSTANCE:1,  ID:123

->ClickControl([TEXT:OK; CLASSNN:Button1])

In order to easily get these values, please see the following Log analyzer articles: Automation and Control info tool.

The Control info tool not only gets these values for you, but it can automatically create and insert already formated functions.


Back to the list



Copyright Carifred © 2010 - 2024, all rights reserved.

Scroll to top