Почему не закрывается окно?
Код:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
While 1
Test()
Sleep(3000)
WEnd
Func Test()
$Form1 = GUICreate("Test", 214, 159, 192, 124)
$Button1 = GUICtrlCreateButton("Button1", 72, 104, 97, 25)
GUISetState(@SW_SHOW)
While 1
$Msg = GUIGetMsg()
Switch $Msg
Case $GUI_EVENT_CLOSE
Return
Case $Button1
WinClose("Test")
EndSwitch
WEnd
EndFunc ;==>Test