{"name":"ctrlActivate","title":"ctrlActivate","type":"command","url":"https://community.bistudio.com/wiki/ctrlActivate","revid":369263,"updated":"2024-09-03T18:42:41Z","groups":["GUI Control"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","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.","syntaxes":[{"syntax":"ctrlActivate control","params":[{"name":"control","type":"Control","type_expr":"Control"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"control"}},{"syntax":"control ctrlActivate full","since":"arma3 2.18","params":[{"name":"control","type":"Control","description":"button based control (CT_BUTTON, CT_XBUTTON, CT_SHORTCUTBUTTON, CT_ACTIVETEXT)","type_expr":"Control"},{"name":"full","type":"Boolean","description":"true to simulate button click in full including UI event handling","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"control"},"right":{"text":"full"}}],"examples":[{"code":["ctrlActivate _control;"]},{"code":["_control ctrlEnable false;\nctrlActivate _control; // Action fired."]}],"see_also":["allControls","allDisplays","controlsGroupCtrl","ctrlDelete","ctrlModel","ctrlSetModel","ctrlPosition","ctrlSetPosition","ctrlClassName","ctrlModelScale","ctrlSetModelScale","ctrlModelDirAndUp","ctrlSetModelDirAndUp","displayParent"]}