GetClipboardData()

Summary

Gets data from the Windows clipboard.

Changes

Added to Version 6.0/2012.

Syntax

clip_array = GetClipboardData(string data_type [, options])

Argument Contents
data_type A string with the data type ("Text")
Option Type Contents
Output Table Boolean If "True" parses a string with tabs and carriage returns as a 2-dimensional array, otherwise "False" (default) to just return a string
Convert to Numbers Boolean If "True" the output table will be converted to a table of numbers, otherwise "False" (default) to just return strings

Returns

An array with the clipboard data of the given type.

Notes

  • The options array is an optional argument.

  • Currently only "Text" is supported as a data type.

  • The return array will have just one string item, possibly null, unless the Output Table option is used and the string can be parsed into a 2-dimensional array.

Examples

CopyToClipboard({{"Text","A string to copy to the clipboard"}})
ShowArray(GetClipboardData("Text"))
CopyToClipboard({{"Text","Col1\tCol2\tCol3\n123\t345\t531"}})
ShowArray(GetClipboardData("Text",{{"Output Table", "True"}}))

See Also

Function Summary
CopyToClipboard() Copies data to the Windows clipboard