#Include <WindowsConstants.au3>
#Include <GUIConstantsEx.au3>
#Include <WinAPIEx.au3>
#Include <GDIPlus.au3>
Global $Bar
Global $EXP = 50
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("X", 200,100 , 240, 124)
$Button1 = GUICtrlCreateButton("Вкл.", 49, 10, 100, 33, $WS_GROUP)
$Bar =GUICtrlCreateProgress(50,50,90,10)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Func test()
GUICtrlSetData($Bar, $EXP)
EndFunc
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
test()
EndSwitch
WEnd