Tag Statement

Action

In a window declaration, defines one or more tags that the Agent uses internally to uniquely identify the object at runtime. The Agent generates tag statements for GUI objects when you record window declarations if you have turned off multiple tag recording (in Recorder Options).

Note: You never use the tag in your scripts to refer to an object; you always use the object's identifier.

Syntax

[ gui-specifier ] tag tag-string [ | tag-string ]…
Variable Description
gui-specifier Optional. Specifies the GUIs that the statement applies to. See window declaration. If omitted, the statement applies to all GUIs.
tag-string A STRING expression that evaluates to the object's tag. You can specify as many tag-strings as you want; separate them with the pipe character ( | ). The tag can be expressed in several ways. For more information about tag-string formats, see multitag statement.

Notes

The tag statement is functionally equivalent to the multitag statement. It specifies one or more tags that the Agent should use when identifying objects at runtime. The only difference is syntax: With the tag statement, all segments of the tag are in one string and are delimited by the pipe character ( | ), such as:

tag "Case sensitive|$1041"

With the multitag statement, different segments are on their own lines, such as:

multitag "Case sensitive"
"$1041"