Live Stream Broadcast icon Live Stream Broadcast Broadcast live audio and video from ARC camera to the web via HLS; cross-browser streaming. Requires router configuration for external access. Try it →
 

Waitforuserinput

UI.waitForUserInput(timeout, prompt)

Parameters

timeout Time to wait in seconds before stopping waiting for their text input.
prompt The text prompt to display to the user while waiting for their text input

Returns

The lowercase text entered by the user, or the word timeout.

Description

Suspends execution of the script and prompts the user to enter text or a timeout occurs after timeout seconds. If a timeout occurs, the method will return "timeout."

*Note: the returned string is in lowercase



Example

// Wait for any input from the user
response = UI.waitForUserInput(30, "Type anything to me");

print("You entered: " + response);