Clipboard package guide
Read, replace and clear text on the Windows clipboard used by the Run session.
Version 2.17.1. Installed versions can differ. Examples are illustrative and not tested. See Packages.
Prerequisites
- The clipboard is the one Windows shares with every application in the signed-in session. Another application can change it between steps, or block it for a short time.
- Only text is read; images and file lists are not. Copy to and Clear remove anything else on the clipboard.
Actions
Copy from (clipboardAssignFromClipboard)
Read the clipboard text, after Copy to or after a person copies text.
Inputs
None.
Outputs
| Output | Type | Value |
|---|---|---|
result | String | The clipboard text. Bind it to a String variable. |
Example
Run Copy to with value=Invoice 1042. Run Copy from and bind result to the String variable clipboardText.
Expected result
$clipboardText$ is Invoice 1042. If the clipboard is empty or has no text, the result is an empty String. If the clipboard cannot be opened, the step fails.
Copy to (clipboardAssignToClipboard)
Replace the clipboard content with text, for example before you paste.
Inputs
| Input | Editor field | Type, default | Value |
|---|---|---|---|
value | Value | String, empty | Required. Text such as Invoice 1042, or a String variable such as $invoice. To clear the clipboard, use an empty String variable (the field does not accept empty text). |
Outputs
None.
Example
Set value=Invoice 1042, then run Copy from and bind its result to clipboardText.
Expected result
Copy from returns Invoice 1042. The earlier clipboard content is gone.
Clear (clipboardClearClipboard)
Empty the clipboard.
Inputs
None.
Outputs
None.
Example
Run Copy to with value=Temporary sample, then run Clear. Read the clipboard with Copy from.
Expected result
Copy from returns an empty String. The earlier content cannot be recovered.
This package has no conditions.