---
name: "copyToClipboard"
type: command
status: ok
groups: ["System", "Strings"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": true}
source: https://community.bistudio.com/wiki/copyToClipboard
revid: 337563
updated: 2023-02-10T01:05:53Z
---

# copyToClipboard

*Command · System, Strings · Arma 3 v0.50 · introduced in Arma 2 v1.00*

Locality: **server execution only**

## Description

Copies ANSI text string to the clipboard. If Unicode support is desired, see [forceUnicode](../commands/forceUnicode.md).

## Syntax

```sqf
copyToClipboard text
```

**Parameters:**

- `text`: [String](../topics/String.md)

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

## Examples

### Example 1

```sqf
copyToClipboard str _data;
```

## Multiplayer

> [!IMPORTANT]
> Restricted to **[the server](../commands/isServer.md)** for safety reasons.

## See also

[copyFromClipboard](../commands/copyFromClipboard.md) · [diag_log](../commands/diag_log.md) · [forceUnicode](../commands/forceUnicode.md)

## Community notes

**Benargee** — 2014-10-12

To add a line break in output text do this:

```sqf
_br = toString [13,10]; // (carriage return & line feed)
_string = "Line 1" + _br + "Line 2";
copyToClipboard _string;
```

Paste into text editor of choice, you get:

```
Line 1
Line 2
```

(A3 1.30 Stable executed inside .sqf via [execVM](../commands/execVM.md))

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