Jump to content

GUI leaves infinite loop regardless of action


Recommended Posts

I am running my Test GUI in an infinite loop, but it still closes every time immediately after running through the Switch-Case structure.  I would like the GUI to remain open, and I believe it should???? please help!

 

 
    #include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
    GUICreate("Test", 500, 500)
GUISetState(@SW_SHOW)
    $write0Button = GUICtrlCreateButton ("Write 0", 10, 10, 100, 100 )
    While 1
   $nMsg = GUIGetMsg()
   Select
      case $nMSG = $write0Button
         MsgBox($MB_OK, "ASJDKLN", "DONE")
      Case $nMSG = $GUI_EVENT_CLOSE
         ExitLoop
       EndSelect
WEnd
     

GUI_Twst.au3

Link to comment
Share on other sites

  • Developers

You get an error since the variable $MB_OK isn't define due to an include missing:

#include <MsgBoxConstants.au3>

I recommend to install the full SciTE4Autoit3 installer, which will run au3check at run time, which would have told you about this error. :) 

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

6 minutes ago, Jos said:

You get an error since the variable $MB_OK isn't define due to an include missing:

#include <MsgBoxConstants.au3>

I recommend to install the full SciTE4Autoit3 installer, which will run au3check at run time, which would have told you about this error. :) 

Jos

Thank you very much, Will do!

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