---
name: "ctrlActivate"
type: command
status: ok
groups: ["GUI Control"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/ctrlActivate
revid: 369263
updated: 2024-09-03T18:42:41Z
---

# ctrlActivate

*Command · GUI Control · Arma 3 v0.50 · introduced in Armed Assault v1.00*

## 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](../topics/User_Interface_Event_Handlers.md) or [buttonAction](../commands/buttonAction.md), use the alternative syntax for this. "ButtonClick" UI event handler will also be triggered with the alternative syntax. Use [isUIContext](../commands/isUIContext.md) to distinguish between scripted activation and user activation.

## Syntax

### Syntax 1

```sqf
ctrlActivate control
```

**Parameters:**

- `control`: [Control](../topics/Control.md)

**Returns:** [Nothing](../topics/Nothing.md)

### Syntax 2

*since arma3 2.18*

```sqf
control ctrlActivate full
```

**Parameters:**

- `control`: [Control](../topics/Control.md) - button based control (CT_BUTTON, CT_XBUTTON, CT_SHORTCUTBUTTON, CT_ACTIVETEXT)
- `full`: [Boolean](../topics/Boolean.md) - [true](../commands/true.md) to simulate button click in full including UI event handling

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

```sqf
ctrlActivate _control;
```

### Example 2

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

## See also

[allControls](../commands/allControls.md) · [allDisplays](../commands/allDisplays.md) · [controlsGroupCtrl](../commands/controlsGroupCtrl.md) · [ctrlDelete](../commands/ctrlDelete.md) · [ctrlModel](../commands/ctrlModel.md) · [ctrlSetModel](../commands/ctrlSetModel.md) · [ctrlPosition](../commands/ctrlPosition.md) · [ctrlSetPosition](../commands/ctrlSetPosition.md) · [ctrlClassName](../commands/ctrlClassName.md) · [ctrlModelScale](../commands/ctrlModelScale.md) · [ctrlSetModelScale](../commands/ctrlSetModelScale.md) · [ctrlModelDirAndUp](../commands/ctrlModelDirAndUp.md) · [ctrlSetModelDirAndUp](../commands/ctrlSetModelDirAndUp.md) · [displayParent](../commands/displayParent.md)

<sub>Source: [BI Community Wiki — ctrlActivate](https://community.bistudio.com/wiki/ctrlActivate) (revision 369263).</sub>
