Clipboard:read()
Read the current clipboard text.
Signature
Clipboard:read(): string
Returns
string - The current clipboard text. Returns an empty string when no text is available.
Description
Use Clipboard:read() when your macro needs to inspect what is currently stored in the system clipboard.
Examples
local value = Clipboard:read()
print("Clipboard value: " .. value)
local copiedText = Clipboard:read()
if copiedText == "" then
print("Clipboard is empty")
end
Notes
- This method reads plain text from the clipboard
- If the clipboard has no text, the method returns
""