Jump to content

Recommended Posts

Posted

Why is it closing with out hitting the Finish button?

#include <Array.au3>
#include <File.au3>
#include <GuiConstantsEx.au3>
#include <Misc.au3>
#Include <GuiButton.au3>

_Singleton("CreateUser")

; #########################################################################################
; # Create GUI
; #########################################################################################

GUICreate("Account Creation", 300, 300)


; PROGRESS

$progress = 0

;$progressbar = GUICtrlCreateProgress(10, 10, 200, 20)
$progressbar = GuiCtrlCreateProgress(60, 80, 150, 20)
GuiCtrlSetData($progressbar, $progress)
$label = GuiCtrlCreateLabel("Progress:", 5, 82)
$userList = GUICtrlCreateList("", 176, 32, 121, 97)
$finishedButton = GUICtrlCreateButton("Finished", 70,50,60)
GuiSetState(@SW_SHOW)

; #########################################################################################
; # GUI Event
; #########################################################################################

Opt("GUIOnEventMode",1)
GUISetOnEvent ($GUI_EVENT_CLOSE, "Closed")
GUISetOnEvent ($finishedButton, "Finished")

Func Closed()
    Exit
EndFunc

Func Finished()
    MsgBox (4096, "test", "you clicked Finish")
       Exit
EndFunc


; #########################################################################################
; # Progress Bar
; #########################################################################################

$UserName = ("Tester")
$Password = ("Password")

$progress = $progress + 10
GuiCtrlSetData($progressbar, $progress)

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
×
×
  • Create New...