Jump to content
Sign in to follow this  
AlekSomething

GUI Exit Problem

Recommended Posts

AlekSomething

Hello, for the past couple days have been programming in AutoIT. Today I decided to make a GUI program, as i was doing that i ran into a problem... I can't exit the program with the red X. Is there some kind of function i should use? A example script would be nice.

Thanks 

Share this post


Link to post
Share on other sites
somdcomputerguy

This is a stripped down version of the example in the help file.

#include <GUIConstantsEx.au3>

Example1()

; example 1
Func Example1()
    Local $msg

    GUICreate("My GUI") ; will create a dialog box that when displayed is centered
    GUISetState(@SW_SHOW) ; will display an empty dialog box

    ; Run the GUI until the dialog is closed
    While 1
        $msg = GUIGetMsg()

        If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd
    GUIDelete()
EndFunc   ;==>Example1

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

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  

×