Arma 3 Scripting

Command in GUI Control

ctrlActivate

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

Description

Launches action attached to given (button based) control. Command ignores control disabled state. (Example 2). Main syntax command only triggers engine-based actions (cancel or ok codes) and will not trigger button related User Interface Event Handlers or buttonAction, use the alternative syntax for this. "ButtonClick" UI event handler will also be triggered with the alternative syntax. Use isUIContext to distinguish between scripted activation and user activation.

Syntax

Syntax 1

ctrlActivate control

Parameters:

Returns: Nothing

Syntax 2

since arma3 2.18

control ctrlActivate full

Parameters:

Returns: Nothing

Examples

Example 1

ctrlActivate _control;

Example 2

_control ctrlEnable false;
ctrlActivate _control; // Action fired.

See also

allControls · allDisplays · controlsGroupCtrl · ctrlDelete · ctrlModel · ctrlSetModel · ctrlPosition · ctrlSetPosition · ctrlClassName · ctrlModelScale · ctrlSetModelScale · ctrlModelDirAndUp · ctrlSetModelDirAndUp · displayParent