
Prototype: QueryText(WindowIndex, ControlIndex)

Description: Returns the Text of a TextEdit/TextArea/Label control. In case of a TextArea, it will return the selected row, not the entire textarea.

Parameters: WindowIndex, ControlIndex  - the control's reference

Return value: string, may be empty

Example:
 Name = GemRB.QueryText(NameWindow, NameField)
 GemRB.SetToken("CHARNAME",Name)
The above example retrieves the character's name typed into the TextEdit control and stores it in a Token (a string variable accessible to gamescripts, the engine core and to the guiscripts too).

 GemRB.SetToken("VoiceSet", GemRB.QueryText(SoundWindow, TextAreaControl))
The above example sets the VoiceSet token to the value of the selected string in a TextArea control. Later this voiceset could be stored in the character sheet.

See also: SetText, SetToken, accessing_controls


MD5: 7bcc3ff81f595b8d73c784ca32b06d5e
