Sign in to follow this  
Followers 0
HumperHard

GUI keeps closing without interaction

6 posts in this topic

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)

Share this post


Link to post
Share on other sites

Where are you making sure that the program keeps running?

Looks to me it ends after having executed the last line.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Where are you making sure that the program keeps running?

Looks to me it ends after having executed the last line.

Jos

How do I keep it running?

Share this post


Link to post
Share on other sites

c'mon :P

Just check the zillion examples

While 1
   sleep(50)
Wend

Hey Im slowly learning....

Thanks

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  
Followers 0