fullClipboardData

Typeproperty
DictionaryLCS
LibraryLiveCode Script
Syntax
set the fullClipboardData[<key>] to <data>
set the fullClipboardData to empty
Summary

Provides access to the contents of the clipboard.

Introduced8.0
OSmac, windows, linux
Platformsdesktop
Example
lock the clipboard
put the keys of the fullClipboardData
unlock the clipboard
lock the clipboard
set the fullClipboardData["text"] to "Hello, World!"
set the fullClipboardData["html"] to "<p>Hello, World!</p>"
set the fullClipboardData["private"] to "MyCustomData"
unlock the clipboard
Values
NameTypeDescription
Value

The fullClipboardData pseudo-array provides access to the data on the clipboard. It can only be accessed while the clipboard is locked.

RelatedProperty: clipboardData, rawClipboardData, fullDragData
Command: lock clipboard, unlock clipboard
Function: clipboard
Glossary: clipboard
Description

Use the fullClipboardData to gain access to the system clipboard. The keys for the fullClipboardData are:

  • "text": plain text
  • "rtftext": LiveCode rich text format data
  • "htmltext": LiveCode HTML text
  • "styledtext": array of LiveCode styled text
  • "image": any of PNG, GIF or JPEG image. If on Windows, additionally BMP image.
  • "png": PNG image
  • "gif": GIF image
  • "jpeg": JPEG image
  • "windows bitmap": BMP image (Windows only)
  • "windows metafile": Windows native vector graphics image (Windows only)
  • "rtf": Rich Text Format data
  • "html": HTML
  • "styles": LiveCode styled text data
  • "objects": LiveCode objects
  • "files": List of newline-separated file paths
  • "private": available for in-app use

Note: More keys and data types may be added in the future.

If the contents of the clipboard were placed there by another app, the clipboard will be automatically cleared when written to. If you want to do this explicitly, use set the fullClipboardData to empty.

The rtftext, htmltext, styles and styledtext properties are handled specially by LiveCode: adding any one of them will cause the rest (plus text) to be automatically generated and added. You can query the keys of the fullClipboardData to determine what types of data are on the clipboard. When setting the text property the clipboard (with the exception of private data) is cleared if it includes any of these properties. This is to allow setting plain text only.

If you require lower-level access to the clipboard, see the rawClipboardData property.

Tip: It is good practice to lock the clipboard before accessing it to prevent data corruption.

Tagsui,clipboard