GuiSetValue
guiSetValue
Sets the value of an element in a loaded RML document.
Syntax
bool guiSetValue(DocumentHandle document, string elementId, string value)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
document |
DocumentHandle |
yes | The owning document. |
elementId |
string |
yes | The target element's id attribute. |
value |
string |
yes | The new value. |
Returns
Returns true when the value is updated; otherwise returns false.
Examples
Fill a text input:
guiSetValue(chatDocument, "chat-input", "Hello world")
Notes
- Available only in client-side resource scripts.