{"name":"ctrlActivate","operator":null,"title":"ctrlActivate","type":"command","url":"https://community.bistudio.com/wiki/ctrlActivate","revid":369263,"updated":"2024-09-03T18:42:41Z","groups":["GUI Control"],"status":"ok","replaced_by":[],"games":[{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma1","name":"Armed Assault","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"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","since":null,"effect":null,"exec":null,"params":[{"name":"control","type":"Control","optional":false,"default":null,"description":null,"types":["Control"],"since":null,"text":"control: Control"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"unary","operator":null,"left":null,"right":{"text":"control","types":["Control"]}},{"syntax":"control ctrlActivate full","since":"arma3 2.18","effect":null,"exec":null,"params":[{"name":"control","type":"Control","optional":false,"default":null,"description":"button based control (CT_BUTTON, CT_XBUTTON, CT_SHORTCUTBUTTON, CT_ACTIVETEXT)","types":["Control"],"since":null,"text":"control: Control - button based control (CT_BUTTON, CT_XBUTTON, CT_SHORTCUTBUTTON, CT_ACTIVETEXT)"},{"name":"full","type":"Boolean","optional":false,"default":null,"description":"true to simulate button click in full including UI event handling","types":["Boolean"],"since":null,"text":"full: Boolean - true to simulate button click in full including UI event handling"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"control","types":["Control"]},"right":{"text":"full","types":["Boolean"]}}],"examples":[{"text":"```sqf\nctrlActivate _control;\n```","code":["ctrlActivate _control;"]},{"text":"```sqf\n_control ctrlEnable false;\nctrlActivate _control; // Action fired.\n```","code":["_control ctrlEnable false;\nctrlActivate _control; // Action fired."]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["allControls","allDisplays","controlsGroupCtrl","ctrlDelete","ctrlModel","ctrlSetModel","ctrlPosition","ctrlSetPosition","ctrlClassName","ctrlModelScale","ctrlSetModelScale","ctrlModelDirAndUp","ctrlSetModelDirAndUp","displayParent"],"notes":[],"categories":["ArmA: Armed Assault: New Scripting Commands","ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: GUI Control","Introduced with Armed Assault version 1.00","Scripting Commands","Take On Helicopters: Scripting Commands"]}