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:
control: Control
Returns: Nothing
Syntax 2
since arma3 2.18
control ctrlActivate full
Parameters:
control: Control - button based control (CT_BUTTON, CT_XBUTTON, CT_SHORTCUTBUTTON, CT_ACTIVETEXT)full: Boolean - true to simulate button click in full including UI event handling
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