Remote instances script functions¶
Functions for C# (Cb.Call) and Python (cb.call). See Script functions for how to use them.
remote.getInstances¶
Lists the other Cuebot computers set up on the Remote page, and the ones connected to you, with their status.
Gives back: A list. Each item has name, outgoing (true when you connect to it), state (like "Connected"), message, instanceId, instanceName, instanceOs, instanceVersion and connectedAt.
var answer = await Cb.Call("remote.getInstances");
answer = cb.call("remote.getInstances")
remote.sendSignal¶
Sends a named signal to another Cuebot computer, so an action there can react to it. Fails when the name is empty.
| Value | What to put in |
|---|---|
name |
The signal name, like "sceneChanged". |
instance |
Optional. Which computer to send to (its name or id). Leave it out for every connected one. |
args |
Optional. Extra values to send along, as an object, like { "scene": "Gameplay" }. |
Gives back: How many computers got the signal (0 when none are connected).
var answer = await Cb.Call("remote.sendSignal", new { name = "sceneChanged", args = new { scene = "Gameplay" } });
answer = cb.call("remote.sendSignal", name="sceneChanged", args={"scene": "Gameplay"})
remote.waitForSignal¶
Waits until another Cuebot computer sends a signal with this name. Only signals that arrive after you start waiting count.
| Value | What to put in |
|---|---|
name |
The signal name to wait for, like "ready". |
instance |
Optional. Only accept it from this computer (its name or id). Leave it out for any computer. |
timeoutMs |
Optional. How long to wait, in milliseconds. Leave it out for 30000 (30 seconds); 0 waits forever. |
Gives back: The signal with name, sender (the action that sent it), instanceId, instanceName, instanceLabel, instanceOs, instanceVersion and args. null when time ran out.
var answer = await Cb.Call("remote.waitForSignal", new { name = "ready", timeoutMs = 10000 });
answer = cb.call("remote.waitForSignal", name="ready", timeoutMs=10000)