oi10:presentation_server:getdata_method_clipboard

GETDATA Method (Clipboard)

Retrieves data from the Windows clipboard in the specified format.

ClipData = Exec_Method( "CLIPBOARD", 

                           "GETDATA",   

                           FormatName )
NameRequiredDescription
FormatNameYesName 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

The data from the clipboard in the requested format if available.

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.

 
// 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
 
 
 

FORMATLIST property, TEXT property, SETDATA method.

  • oi10/presentation_server/getdata_method_clipboard.txt
  • Last modified: 2023/10/25 10:49
  • by 127.0.0.1