---
name: "buttonAction"
type: command
status: ok
groups: ["GUI Control"]
arma3_since: "0.50"
locality: {"argument": "local", "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/buttonAction
revid: 376407
updated: 2025-10-11T00:59:12Z
---

# buttonAction

*Command · GUI Control · Arma 3 v0.50 · introduced in Operation Flashpoint v1.75*

Locality: arguments **local**

## Description

Returns the action assigned to a control of the currently active user dialog. Can be used for buttons and active texts. Read Arma: GUI Configuration for more information about user dialogs and controls.

## Syntax

### Syntax 1

```sqf
buttonAction idc
```

**Parameters:**

- `idc`: [Number](../topics/Number.md) - button IDC

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

### Syntax 2

```sqf
buttonAction control
```

**Parameters:**

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

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

## Examples

### Example 1

```sqf
buttonSetAction [100, { player exec "reply.sqs" }];
_action = buttonAction 100; // Returns { player exec "reply.sqs" };
```

## See also

[buttonSetAction](../commands/buttonSetAction.md)

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