User:Jaberwocky6669/Sandbox

From AutoIt Wiki
Revision as of 14:06, 25 August 2013 by Jaberwocky6669 (talk | contribs) (Created page with "<!-- Autogenerated Wiki Page. --> <!-- Not meant to be user editable. --> <!-- If there is an error here then that means that there is an error in the helpfile or in my script...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Retrieves text from the clipboard.


ClipGet ( )



Parameters

None.


Return Value

Success: Returns a string containing the text on the clipboard.
Failure: Sets @error to 1 if clipboard is empty
to 2 if contains a non-text entry.
to 3 or 4 if cannot access the clipboard.


Remarks

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


Related

ClipPut


Example

#include <MsgBoxConstants.au3>

Example()

Func Example()
	; Retrieve the data stored in the clipboard.
	Local $sData = ClipGet()

	; Display the data returned by ClipGet.
	MsgBox($MB_SYSTEMMODAL, "", "The following data is stored in the clipboard: " & @CRLF & $sData)

	; Add new data to the clipboard.
	ClipPut("A new string added to the clipboard.")

	; Retrieve the data stored in the clipboard.
	$sData = ClipGet()

	; Display the data returned by ClipGet.
	MsgBox($MB_SYSTEMMODAL, "", "The following data is now stored in the clipboard: " & @CRLF & $sData)
EndFunc   ;==>Example