tuur Posted November 17, 2008 Share Posted November 17, 2008 Hi, Here's another one from the category "Basics" (but I haven't found my answer yet ...) How do I close a GUI without completely exiting my script. Uptill now I have worked around with hiding the thing >> GUISetState (@SW_HIDE) But that cannot be the way to go about ... (can it?) Arthur Link to comment Share on other sites More sharing options...
FireFox Posted November 17, 2008 Share Posted November 17, 2008 (edited) Hi, Here's another one from the category "Basics" (but I haven't found my answer yet ...) How do I close a GUI without completely exiting my script. Uptill now I have worked around with hiding the thing >> GUISetState (@SW_HIDE) But that cannot be the way to go about ... (can it?) Arthur Hello, Here is simple example : #Include <GuiConstants.au3>;Constant for $GUI_EVENT_CLOSE Opt("GuiOnEventMode",1);Active on event for gui $win=GuiCreate("",500,500); your gui GUISetOnEvent($GUI_EVENT_CLOSE,"_Exit");If you click on button for close gui go to _Exit function GUISetState();Show gui While 1; Make looping for the script no exit on the end and your gui will be visible Sleep(250) WEnd Func _Exit();Exit with $GUI_EVENT_CLOSE GuiSetState(@SW_HIDE,$win) ;Here you write what you want EndFunc Edited November 17, 2008 by FireFox Link to comment Share on other sites More sharing options...
tuur Posted November 17, 2008 Author Share Posted November 17, 2008 Hi FireFox, Your solution is the one I have been using sofar. My problem is that after I have collected my input via the GUI-Dialog, I want to close the GUI and go on with the rest of my script. So instead of "Exit" I use "ExitLoop" . At that point the GUI still lives (even though I have hidden it with the GUISetState (@SW_HIDE)) How do I completely kill the GUI and go on with the rest of the script??? Arthur Link to comment Share on other sites More sharing options...
FireFox Posted November 17, 2008 Share Posted November 17, 2008 Hi FireFox,Your solution is the one I have been using sofar.My problem is that after I have collected my input via the GUI-Dialog, I want to close the GUI and go on with the rest of my script.So instead of "Exit" I use "ExitLoop" .At that point the GUI still lives (even though I have hidden it with the GUISetState (@SW_HIDE))How do I completely kill the GUI and go on with the rest of the script???ArthurI don't understand really what you want to do,completely kill the GUIPerhaps this function would help you :GUIDelete() Link to comment Share on other sites More sharing options...
tuur Posted November 17, 2008 Author Share Posted November 17, 2008 Thanx FireFox, that's just what I needed Link to comment Share on other sites More sharing options...
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