setClipboardText()
Copies a specific text to the clipboard as plain text.
Synopsis
int setClipboardText(string text);
Parameters
Parameter | Description |
---|---|
text | The text to be copied to the clipboard. |
Return value
In case of error -1. Otherwise 0.
Errors
Missing or wrong arguments.
Description
The function copies a specific text to the clipboard as plain text (= CTRL+C or CTRL+X). The text can be pasted via CTRL+V or getClipboardText().
Example
main()
{
string myText, clipboardText;
myText = "Hello world";
clipboardText = setClipboardText(myText);
DebugN(getClipboardText(clipboardText);
//The text "Hello world" is written to the log viewer
}
Assignment
Availability
UI