ClipGet

From AutoIt Wiki

Jump to: navigation, search

Retrieves text from the clipboard. Adapted from AutoIt docs.

Contents

[edit] Syntax

$str = ClipGet()

[edit] Parameters

None.

[edit] Return Value

Success: Returns a string containing the text on the clipboard.
Failure: Sets @error to:

1if clipboard is empty.
2if clipboard contains a non-text entry.
3 or 4if clipboard cannot be accessed.

[edit] Remarks

When multiple selecting file/dir are stored in the clipboard, the filename/dirname are returned as texts separated by @LF.

[edit] Example

$bak = ClipGet()
MsgBox(0, "Clipboard contains:", $bak)

ClipPut($bak & "additional text")
MsgBox(0, "Clipboard contains:", ClipGet())

[edit] Related Functions

ClipPut

Personal tools