====== GETDATA method (Clipboard) ======
==== Description ====
Retrieves data from the Windows clipboard in the specified format.
==== Syntax ====
ClipData = Exec_Method( "CLIPBOARD",
"GETDATA",
FormatName )
==== Parameters ====
^Name^Required^Description^
|FormatName|Yes|Name of the format to retrieve the data in. This can be one of the common formats listed below (pass as a literal string), or a custom format (can be any string)\\ \\ • CF_TEXT\\ • CF_BITMAP\\ • CF_METAFILEPICT\\ • CF_SYLK\\ • CF_DIF\\ • CF_TIFF\\ • CF_OEMTEXT\\ • CF_DIB\\ • CF_PALETTE\\ • CF_PENDATA\\ • CF_RIFF\\ • CF_WAVE\\ • CF_UNICODETEXT\\ • CF_ENHMETAFILE\\ • CF_HDROP\\ • CF_LOCALE\\ • CF_DIBV5|
==== Returns ====
The data from the clipboard in the requested format if available.
==== Remarks ====
The GETDATA method is basically a wrapper around the GetClipboardData Windows API function, so it is worth examining at the documentation for this on the MSDN website to get a better idea of the capabilities of this method.
==== Example ====
// CLIPBOARD GETDATA example
//
// Look to see if the clipboard has a custom data format
FormatID = "My.Custom.Format"
ClipFormats = Get_Property( "CLIPBOARD", "FORMATLIST" )
Locate FormatID in ClipFormats Using @Fm Setting Pos Then
// Found It
ClipData = Exec_Method( "CLIPBOARD", FormatID )
End
// Look to see if the clipboard has a bitmap
FormatID = "CF_BITMAP"
ClipFormats = Get_Property( "CLIPBOARD", "FORMATLIST" )
Locate FormatID in ClipFormats Using @Fm Setting Pos Then
// Found It
BitmapData = Exec_Method( "CLIPBOARD", FormatID )
End
==== See Also ====
FORMATLIST property, TEXT property, SETDATA method.