ReferenceMiscellaneous

getclipboard

Returns the text on the user's clipboard, or an empty string when it holds no text.

Syntax

getclipboard() -> string

Description

This function is off by default. While it is on, every script that runs can read whatever the user last copied, which may be a password or a private message. Turning it on in the function list shows a warning, and it takes effect the next time the game starts. The text is limited to 1 MiB.

Example

print(#getclipboard())

Notes

These are Game executor contracts. Check build requirements and session lifetimes before using them.