#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 350, 70)
GUICtrlCreateLabel("Кнопка 1 включает кнопку 2, кнопка 2 сама себя выключает", 8, 16, 314, 17)
$Button1 = GUICtrlCreateButton("Кнопка 1", 8, 32, 75, 25, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Кнопка 2", 88, 32, 75, 25, $WS_GROUP)
$exit = GUICtrlCreateButton("Выход", 168, 32, 75, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
case $exit
Exit
case $Button1
GUICtrlSetState($Button2,$GUI_ENABLE)
Case $Button2
GUICtrlSetState($Button2,$GUI_DISABLE)
EndSwitch
WEnd