I have a gui box pop up asking the user to pick a backup to restore out of a list of dirs in a folder. Everything works but the gui window
stays up after selecting the backup and clicking the button. What command is used to close the window and continue with the rest of the script
after the $button1 is pressed?
Thanks for any help.
;restore
$drv = InputBox("Drive letter","What drive do you want to restore from:", "e:\" )
$array=_FileListToArray($drv & "\backup")
$hwnd = GUICreate("restore", 301, 101, 192, 125)
$combo = GUICtrlCreateCombo("Select a backup to restore", 66, 20, 169, 25)
$Button1 = GUICtrlCreateButton("OK", 114, 56, 73, 25, $WS_GROUP)
For $i=1 To Ubound($array)-1
GUICtrlSetData($combo,$array[$i])
Next
GUISetState()
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$str = GUICtrlRead ( $combo )
;end restore menu -----------------------