Lightweight clipboard library

Other Lightweight clipboard library

No permission to download

0cguboss

Registered
Joined
Jun 7, 2025
Messages
13
0cguboss submitted a new item:

Lightweight clipboard library - clipboard

local clipboard = require("clipboard") -- assuming the module is saved as clipboard.lua
-- Read text from the clipboard
local text, err = clipboard.get()
if text then
print("Clipboard text:", text)
else
print("Error reading clipboard:", err)
end
-- Write text to the clipboard
local ok, err = clipboard.set("Sample text with Polish characters: ąćęłńóśźż and emoji 😀")
if ok then
print("Text successfully written to clipboard!")
else
print("Error writing to clipboard:", err)
end

Read more...
 
Back
Top