Jump to content

Help closing GUI but running more code


dickep
 Share

Recommended Posts

OK, I am a newbee for the GUI stuff.

I used KODA to create a GUI window that I want to get a number. After that I want to close the input window GUI and just let the rest of the code run (actually calls and application over and over unit it runs out of loop counter). I just cannot find/figure out anything to close the GUI except to do an EXIT.

Can I do this?

#include <GUIConstants.au3>

$BatCalLoops = 0
#Region ### START Koda GUI section ### Form=
$BatCalUtil = GUICreate("Battery Calibration Utility", 335, 86, 106, 174)
$Label1 = GUICtrlCreateLabel("Enter Number of loops to run Battery Calibration:", 40, 20, 230, 17)
$BatCalLoops = GUICtrlCreateInput("", 280, 18, 30, 21)
$Button1 = GUICtrlCreateButton("OK", 160, 56, 75, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            ExitLoop
    EndSwitch
WEnd

; code continues here

Thanks

E

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