Arma 3 Scripting

Command in GUI Control

ctrlText

Also available as Markdown and JSON, or read the original wiki page.

Description

Returns the text of a control of the currently active user dialog. This command can be used on static texts, buttons, edit lines and active texts as well as for images, where it returns the image path. Does not work on HTML control and returns empty string "". Since Arma 3 v2.05 supported control types are:

Since Arma 3 v2.20 CT_PROGRESS is also supported.

Syntax

Syntax 1

ctrlText idc

Parameters:

Returns: String - the text or image path or texture is returned, dependent on the control type

Syntax 2

ctrlText controlName

Parameters:

Returns: String - the text or image path or texture is returned, dependent on the control type

Examples

Example 1

_text = ctrlText 100;

Example 2

_text = ctrlText _control;

See also

ctrlTextSecondary · ctrlSetText · Arma: GUI Configuration