lock clipboard

Locks the clipboard to prevent updates by other apps.

# Metadata

Platforms: desktop OS: mac, windows, linux Introduced: 8.0 Security:

# Syntax

lock [the] clipboard

# Examples

lock the clipboard

# Description

Use the lock clipboard command to ensure that other apps do not change the contents of the clipboard while you are working with it.

>*Note:* If you use the clipboardData or fullClipboardData > properties, locking the clipboard is not required (it will be done > automatically) but is recommended.

While the clipboard is locked, the contents of the clipboard available via the clipboardData, fullClipboardData and rawClipboardData properties will not change due to accesses by other apps. Similarly, changes made within LiveCode will not be visible to other apps until the clipboard is unlocked (using the unlock clipboard command).

>*Tip:* Use lock clipboard to ensure the clipboard does not change > between accesses.

# Tags

# See

- **command:** unlock clipboard - **function:** clipboard - **property:** clipboardData, fullClipboardData, rawClipboardData