Skip to content

Desktop script functions

Functions for C# (Cb.Call) and Python (cb.call). See Script functions for how to use them.

desktop.getClipboard

Reads the text that is on your clipboard right now. Fails with an error when this computer has no clipboard Cuebot can use.

Gives back: The clipboard text, or null when the clipboard holds no text.

var answer = await Cb.Call("desktop.getClipboard");
answer = cb.call("desktop.getClipboard")

desktop.notify

Shows a pop-up notification on your computer. Cuebot uses the system's notifications where it can (Linux), else its own pop-up in the app.

Value What to put in
title Optional. The top line, like "New follower!". Default "Cuebot".
message The text under the title, like "CoolViewer just followed".
icon Optional. The path to an image file to show with it.
id Optional. A name for this notification. The "Toast notification clicked" trigger tells you this name when it is clicked.
duration Optional. How many seconds it stays on screen, 1 to 120. Default 5.

Gives back: Where it was shown: "system" or "in-app". Fails with an error when no way to show it is available.

var answer = await Cb.Call("desktop.notify", new { title = "New follower!", message = "CoolViewer just followed" });
answer = cb.call("desktop.notify", title="New follower!", message="CoolViewer just followed")

desktop.setClipboard

Puts text on your clipboard, as if you copied it. Fails with an error when this computer has no clipboard Cuebot can use.

Value What to put in
text The text to copy, like "Thanks for watching!"

Gives back: true when it worked.

var answer = await Cb.Call("desktop.setClipboard", new { text = "Thanks for watching!" });
answer = cb.call("desktop.setClipboard", text="Thanks for watching!")