Environment

setclipboard

Writes one value to the Windows system clipboard as text.

Syntax

setclipboard(text: any)
Aliases toclipboard

Arguments

NameTypeDescription
textanyValue converted to a string and written to the Windows system clipboard.

Description

Writes one value to the Windows system clipboard as text. The value is converted to a string. The function returns no status value, whether the clipboard write succeeds or fails. toclipboard is an alias.

Call it with 1 parameter(s): text. The argument table explains which values are required and which ones only refine the behavior.

It does not return data. Treat the call as an action and handle errors around the call site when needed.

Example

Write a value to the Windows system clipboard.

setclipboard("Copied from Real")

toclipboard(12345)