#Include <StaticConstants.au3>
Global $hGui, $iLabel, $iButton1, $iButton2, $iButton3, _
$sBuffer ;Сохраняем сюда
; ---
$hGui = GUICreate( "", 208, 54 )
$iLabel = GUICtrlCreateLabel( '123', 5, 5, 198, 18, $SS_CENTER )
$iButton1 = GUICtrlCreateButton( "Изменить", 5, 25, 65, 24 )
$iButton2 = GUICtrlCreateButton( "Сохранить", 71, 25, 65, 24 )
$iButton3 = GUICtrlCreateButton( "Загрузить", 137, 25, 65, 24 )
GUICtrlSetBkColor( $iLabel, 0x00ff00 )
GUISetState()
While 1
Switch GUIGetMsg()
Case -3
ExitLoop
Case $iButton1
GUICtrlSetData( $iLabel, Random( 100, 999, 1 ) )
Case $iButton2
$sBuffer = GUICtrlRead( $iLabel )
Case $iButton3
If $sBuffer Then
GUICtrlSetData( $iLabel, $sBuffer )
Else
MsgBox( 16, '', 'Память пуста!' )
EndIf
EndSwitch
WEnd