Sign in to follow this  
Followers 0
clearguy

2 GUI's in a script

5 posts in this topic

Hi,

In my script I made a first GUI with OnEvent mode; then if a button is pressed a function is called and a second GUI window appears, the function ends.

Problem: when I try to close the second GUI window, it doesn't work! I have to close the first window to terminate the script, but it isn't that I want.

Someone could help me, please?

P.S.: $GUI_EVENT_CLOSE is set as GuiSetOnEvent, with function to end the script.

Share this post


Link to post
Share on other sites



Without a source code to work on, it is impossible to help you. Any way this is what I found using the search.

Link 1

Link 2


AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line

Share this post


Link to post
Share on other sites

Hi,

In my script I made a first GUI with OnEvent mode; then if a button is pressed a function is called and a second GUI window appears, the function ends.

Problem: when I try to close the second GUI window, it doesn't work! I have to close the first window to terminate the script, but it isn't that I want.

Someone could help me, please?

P.S.: $GUI_EVENT_CLOSE is set as GuiSetOnEvent, with function to end the script.

GUISetOnEvent($GUI_EVENT_CLOSE, "GuiCloseClick")

Func GuiCloseClick()
    If @GUI_WINHANDLE = $Gui_Help_About Then 
        GUISetState(@SW_HIDE, $Gui_Help_About)
    EndIf
    If @GUI_WINHANDLE = $gui_Main Then 
        Exit
    EndIf
EndFunc

etc :whistle: You should get the idea ;)


My little company: Evotec (PL version: Evotec)

Share this post


Link to post
Share on other sites

Or use GuiDelete and GuiSwitch rather than @SW_HIDE. With @SW_HIDE your window will continue to consume resources.

Share this post


Link to post
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
Sign in to follow this  
Followers 0