GuiGetValue
Jump to navigation
Jump to search
guiGetValue
Reads the value of an element in a loaded RML document.
Syntax
string guiGetValue(DocumentHandle document, string elementId)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
document |
DocumentHandle |
yes | The owning document. |
elementId |
string |
yes | The target element's id attribute. |
Returns
Returns the element value as a string, or nil if it cannot be read.
Examples
Read and print a text input:
local message = guiGetValue(chatDocument, "chat-input")
if message then
print(message)
end
Notes
- Available only in client-side resource scripts.