Change text/value of a label in AutoIt

Send Us a Sign! (Contact Us!)

The following code show an example of a simple GUI and, after the drawing, the change of the text of the label:

#include <GUIConstantsEx.au3>
$gui = GUICreate("My GUI", 200, 200)

$label = GUICtrlCreateLabel("Line 1 Cell 1", 10, 30, 100, 25)
$Button_1 = GUICtrlCreateButton("change label", 100, 100)
GUISetState()
While 1
$msg = GUIGetMsg()
Switch $msg
Case -3; it's the same as $GUI_EVENT_CLOSE
Exit
Case $Button_1
GUICtrlSetData ($label, "New text for label")
EndSwitch
WEnd

The GUICtrlSetData function, in AutoIt, set or update the value of a GUI control/object.