Jump to content

Gui starterquestion


tuur
 Share

Recommended Posts

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

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 by FireFox
Link to comment
Share on other sites

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

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

I don't understand really what you want to do,

completely kill the GUI

Perhaps this function would help you :

GUIDelete()

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...