Jump to content

Recommended Posts

Posted

Hello, I've made a simple example of my problem.

#include <GUIConstants.au3>
GuiCreate("")
$box = GuiCtrlcreatebutton("", 100, 100, 100, 100)

Guisetstate()
While 1
    $msg = GuiGetMsg()
    If $msg = $box then 
        $asdf = GuiCreate("Aasdfasdfasd")
        $circle = GuiCtrlCreatebutton("", 200, 100, 100, 100)
        Guisetstate()
        Do
            $ms = GuigetMsg()
            If $ms = $circle then 
                GuiDelete($asdf)
                Msgbox(0, "", "")
                Endif
        Until $ms = $GUI_EVENT_CLOSE
        EndIf
    If $msg = $GUI_EVENT_CLOSE then exit
Wend

How can I make it so that once you bush the first button and close the second you are allowed to push the first button again. And why (after you have opened and closed the "asdf" window) does it take two clicks on the exit button to make it exit? I think I missed something in the beginning when I taught myself how to use autoit... :)

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Posted

How do you expect the button to ever work again when there is no way out of your Do...Until loop except closing the GUI?

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
×
×
  • Create New...