[autoit]
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 449, 192, 124)
$Button1 = GUICtrlCreateButton("Button1", 104, 184, 75, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
case $Button1
$form2 = GUICreate("Test", 633, 449, 192, 124)
GUISetState(@SW_SHOW)
while 1
$nMsg = GUIGetMsg()
Switch $nMsg
case $GUI_EVENT_CLOSE
GUIDelete($form2)
ExitLoop
EndSwitch
WEnd
EndSwitch
WEnd