UVK scripting commands - Special title definition

Show menu

Special title definition

The special title definition is the text you use as the title parameter of the ->WaitWindow() function. You will rarely need to use this parameter, because it is much easier to leave it blank, and UVK will automatically manage the current topmost window belonging to the last <Run> command.

However, you may need to automate a window that does not belong to the process you created with the <Run> command. The Control info tool will help you to get the special title definition for the window, but if you need a more accurate definition, we will explain here.

You can specify the full title's text, or just a portion of it, as in the example below:

->WaitWindow(20, Untitled - Notepad)
->WaitWindow(20, Untitled)

But  sometimes there may be several windows matching the same title. In this case, a special description can be used as the window title parameter. This description can be used to identify a window by the following properties:

TITLE - Window title
CLASS - The internal window classname
LAST - Last window used in a previous Automation function.
ACTIVE - Currently active window
INSTANCE - The 1-based instance when all given properties match

One or more properties are used in the title parameter of a window command in the format:

[PROPERTY1:Value1; PROPERTY2:Value2]

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

Examples:

;Wait a window of classname "Notepad"
->WaitWindow(20, [CLASS:Notepad])

;Close the currently active window
->WaitWindow(20, [ACTIVE])
->CloseWindow()

;Wait for the 2nd instance of a window with title "My Window" and classname "My Class"
->WaitWindow(20, [TITLE:My Window; CLASS:My Class; INSTANCE:2])

 

Back to the list

 


 

Copyright Carifred © 2010 - 2024, all rights reserved.

Scroll to top