sys.clipboard readwrite



Get or set data from/to the Windows clipboard. When reading, returns a table with kind and content fields, or nil if the clipboard is empty. The kind field can be "text", "files", or "image".

Notes

Example

local clipboard = sys.clipboard if not clipboard then print("Windows clipboard is empty") else print("Clipboard contains "..clipboard.kind..":") if clipboard.kind == "files" then for entry in each(clipboard.content) do print("\t"..entry.fullpath) end sys.clipboard = nil else print("\t"..(clipboard.content or "nil")) end end