Jump to content
Sign in to follow this  

Help closing GUI but running more code

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)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
        Case $Button1

; code continues here



Share this post

Link to post
Share on other sites

you could just do:



GUISetState($gui, @SW_HIDE)

I missed that in the help files - my bad.

WORKED WELL. Thank you very much Swift

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