Livecode Wiki
Advertisement

Provides access to the contents of the clipboard(glossary).Syntax:

set the fullClipboardData to empty

Examples:

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

Use the fullClipboardData to gain access to the system clipboard(glossary). 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
 - "png": PNG image
 - "gif": GIF image
 - "jpeg": JPEG image
 - "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


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

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

The `text`, `rtftext`, `htmltext`, `styles` and `styledtext` properties are handled specially by LiveCode: adding any one of them will cause the rest to be automatically generated and added. You can query the keys of the fullClipboardData to determine what types of data are on the clipboard(glossary).

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

  • Tip:* It is good practice to lock the clipboard(glossary) before

accessing it to prevent data corruption.

See also: clipboard (function),clipboardData (property),rawClipboardData (property),fullDragData (property),

Advertisement