Hylia Posted October 9, 2015 Posted October 9, 2015 (edited) Hi, I'm playing around with Servers and Clients in AutoIT, and I wanted to have an inital GUI (see code 1) where I can specify my port and IP then click a button to start the server, when I click the button I want the current GUI to close and a new GUI to open, how would I go about doing such a thing? So basically, the question boils down to: How do I remove a window created by GUICreate? func ServerLauncher() ; Server Init $MainForm = GUICreate("Server Starter", 158, 113, 192, 124) $IP = _GUICtrlIpAddress_Create($MainForm, 16, 16, 130, 21) _GUICtrlIpAddress_Set($IP, "127.0.0.1") $Port = GUICtrlCreateInput("Port", 56, 44, 49, 21) $bStartServer = GUICtrlCreateButton("Start Server", 40, 72, 75, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $bStartServer ExitLoop EndSwitch WEnd EndFunc Edited October 9, 2015 by Hylia
Hylia Posted October 9, 2015 Author Posted October 9, 2015 Ok I solved it, instead of calling GUIDelete($MainFom) in my second GUI code, I had to call it at: Case $bStartServer GUIDelete($MainForm) ExitLoop tazdev 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now