Jump to content

Closing A Second GUI


 Share

Recommended Posts

Hello all,

I am trying to create a sort of pop out menu for my script. It will just be another gui that opens from the main one, with the push of a button. But for some reason I can't seen yo get the newly opened Gui to close. If I click the X nothing happens and using Exitloop closes both the main and the new gui. Here is what I have

#include <GUIConstants.au3>

GUICreate("Window")
GUISetState ()
$button = GUICtrlCreateButton("click me", 50 , 50)

While 1
    Switch GUIGetMsg()

            Case $button
                GUICreate("Extra Window",300,300)
                GUISetState ()
                $close = GUICtrlCreateButton("Close",50, 50)
                While 1
                Switch GUIGetMsg()
                    Case $close
                        ExitLoop
                EndSwitch
                WEnd

                Exit


    EndSwitch

Wend

Thanks in advance!

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...