Shows a dialog box on avatar's screen with the text message. It contains a text box for input, any text that is entered is said by avatar on channel when the "Submit" button is clicked.

Syntax

void llTextBox( key avatar, string message, integer channel );

Forced delay: 1.0 seconds. Energy: 10.0.

Parameters

key avatar
avatar UUID that is in the same region
string message
message to be displayed in the text box
integer channel
output chat channel, any integer value

Constants

Channel ConstantDescription
DEBUG_CHANNEL0x7FFFFFFFChat channel reserved for script debugging and error messages, broadcasts to all nearby users.
PUBLIC_CHANNEL0x0Chat channel that broadcasts to all nearby users. This channel is sometimes referred to as: open chat, local chat and public chat.

Caveats

message limits

Examples

integer  gListener;
default
{
    touch_start(integer total_number)
    {
        // See 'discussion' page for more comments on choosing a channel and possible left-open listener
        integer channel = -13572468;
        // "" saves byte-code over NULL_KEY
        gListener = llListen( channel, "", "", "");     
        llTextBox(llDetectedKey(0), "Some info text for the top of the window...", channel);
    }
    listen(integer channel, string name, key id, string message)
    {
        llListenRemove(gListener);
        llSay(0, "You wrote: " + message);
    }
}

If the user hits Enter before clicking the "Submit" button, there will be a final carriage return in the message. In the rare event that this could be a problem, it is easily removed:

        message = llStringTrim(message,STRING_TRIM);

Notes

Instead of mouse clicking: "Submit", you can use keyboard keys: press Tab and then Enter

See also

Events

Functions

Deep notes

History

Introduced in 568

Source

indra/llcommon/lllslconstants.h:189 <cpp>// llTextBox() magic token string - yes this is a hack. sue me. const std::string TEXTBOX_MAGIC_TOKEN = "!!llTextBox!!";</cpp>

Footnotes

  1. Channel zero is also known as: PUBLIC_CHANNEL, open chat, local chat and public chat