Jump to content
Sign in to follow this  

Very annoying problem

Recommended Posts

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

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

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

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

Share this post

Link to post
Share on other sites

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?

So it's actually staying in the loop even though the window is open? That explains a lot. Yep, now it works. Lol, seems so obvious now, thanks...

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  

  • Create New...