Nilesoft Shell Pro GitHub

CLIPBOARD


Clipboard handling functions.


clipboard.get

Returns the value of the stored clipboard.

Syntax

clipboard.get
clipboard.set

Store a value in the clipboard.

Syntax

clipboard.set("Hello world!")
clipboard.length

Returns the length of the value stored in the clipboard.

Syntax

clipboard.length
clipboard.is_empty

Verifies that there is a value stored in the clipboard.

Syntax

clipboard.is_empty
clipboard.is_files

Returns true when files or folders were copied or cut in File Explorer.

Syntax

clipboard.is_files
clipboard.files

Returns the files and folders that were copied or cut in File Explorer: their full paths, one per line, or separated by the text you give. With [n] it returns only one of them, counting from 0. .name, .title (the name without its extension), .ext and .quote (the path in double quotes) give that part of each path instead.

Syntax

clipboard.files                  // every path, one per line
clipboard.files(', ')            // every path, separated by a comma
clipboard.files[0]               // the first path
clipboard.files.count            // how many there are
clipboard.files.name(', ')       // every name, such as "report.docx, photo.jpg"
clipboard.files.quote(' ')       // every path in double quotes, separated by a space
clipboard.files.title[0]         // the first name without its extension

Example

item(title='Copy the names of the copied files' where=clipboard.is_files cmd=clipboard.set(clipboard.files.name))
clipboard.empty

Empty values stored in the clipboard.

Syntax

clipboard.empty