GetText Function (ClipboardClass)


ClipboardClass class.


Returns the text on the clipboard.


lsText = Clipboard.GetText()
Variable Description
lsText The clipboard text. LIST OF STRING.


Each line of text on the clipboard is an item in the returned list. If the clipboard’s contents are graphical or are text that is not plain, which means the text cannot be interpreted as ASCII, GetText returns an empty list ({}).

X Window System

On X platforms, GetText returns the primary selection, which is the middle mouse-button paste. To enable GetText to return the clipboard selection, set the OPT_PRIMARY_SELECTION environment variable to FALSE.


LIST OF STRING lsClipContents
lsClipContents = Clipboard.GetText()