Jump to content
Sign in to follow this  

GUIGetMsg() not returning anything

Recommended Posts

I've been fumbling around with my script for the past hour and I can't get GUIGetMsg() to return anything from my GUI, so it just keeps looping and won't let me close it unless I end task.

Func Aboutbox()
    TrayItemSetState($tray1, $TRAY_UNCHECKED)

    $Aboutbox = GUICreate("About MyProgram", 254, 223, Default, Default)
    $objIE = _IECreateEmbedded()
    GUICtrlCreateObj($objIE, 0, 0, 254, 177)
    _IENavigate($objIE, "res://" & @AutoItExe & "/ABOUT")
    $AboutBoxBtn = GUICtrlCreateButton("OK", 89, 189, 75, 23, $WS_GROUP)

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
            Case $AboutBoxBtn
EndFunc   ;==>Aboutbox

Anybody know why this won't work?

Edited by Tachibanya

Share this post

Link to post
Share on other sites

You're probably running OnEventMode, but it's hard to tell when you provided nothing for us to work on. Show us some code that actually runs and fails and we can help you.

In the future when asking for help, please write a short runnable/working reproducer (example) so we don't have to make wild guesses (like I did here). As a bonus you will see that you often find the solution when writing the reproducer.

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...