{"name":"copyToClipboard","title":"copyToClipboard","type":"command","url":"https://community.bistudio.com/wiki/copyToClipboard","revid":337563,"updated":"2023-02-10T01:05:53Z","groups":["System","Strings"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","locality":{"server_exec":true},"description":"Copies ANSI text string to the clipboard. If Unicode support is desired, see forceUnicode.","syntaxes":[{"syntax":"copyToClipboard text","params":[{"name":"text","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"text"}}],"examples":[{"code":["copyToClipboard str _data;"]}],"multiplayer":"> [!IMPORTANT]\n> Restricted to **the server** for safety reasons.","see_also":["copyFromClipboard","diag_log","forceUnicode"],"notes":[{"user":"Benargee","date":"2014-10-12T02:38:00Z","text":"To add a line break in output text do this:\n\n```sqf\n_br = toString [13,10]; // (carriage return & line feed)\n_string = \"Line 1\" + _br + \"Line 2\";\ncopyToClipboard _string;\n```\n\nPaste into text editor of choice, you get:\n\n```\nLine 1\nLine 2\n```\n\n(A3 1.30 Stable executed inside .sqf via execVM)"}]}