#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("Form1", 237, 232, 192, 114)
$Button1 = GUICtrlCreateButton("Кнопка +", 40, 128, 161, 41)
$Button2 = GUICtrlCreateButton("Кнопка -", 40, 178, 161, 41)
$Label1 = GUICtrlCreateLabel("0", 48, 40, 140, 33, $SS_CENTER)
GUISetState(@SW_SHOW)
Func addcount()
$count = GUICtrlRead($Label1, 0)
$count = $count + 1
GUICtrlSetData($Label1, $count)
EndFunc
Func minuscount()
$count = GUICtrlRead($Label1, 0)
$count = $count - 1
GUICtrlSetData($Label1, $count)
EndFunc
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
addcount()
Case $Button2
minuscount()
EndSwitch
WEnd