Arma 3 Scripting

Command in System, Strings

copyToClipboard

Also available as Markdown and JSON, or read the original wiki page.

Description

Copies ANSI text string to the clipboard. If Unicode support is desired, see forceUnicode.

Syntax

copyToClipboard text

Parameters:

Returns: Nothing

Examples

Example 1

copyToClipboard str _data;

Multiplayer

Important

Restricted to the server for safety reasons.

See also

copyFromClipboard · diag_log · forceUnicode

Community notes

Benargee

To add a line break in output text do this:

_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)