dufran3 Posted December 8, 2006 Posted December 8, 2006 GUI window stays open until script ends, however I want to close it just before the end of the script, so a pop up box will display saying it is complete. $gMain = GUICreate('Star Splash',500,100,-1,-1,$WS_POPUP,$WS_EX_TOPMOST) doing all my stuff....while the gui is displayed, all the actions are being performed in the background hidden...then WinClose('Star Splash') GUICtrlSetState($gmain,$GUI_HIDE) FileWriteLine($FileOpen, 'Script Finished ' & @MDAY & "-" & @MON & "-" & @YEAR & " " & @HOUR & ":" & @MIN & ":" & @SEC & @CRLF) FileClose($FileOpen) MsgBox(0,'','Upgrade is Complete') Neither the winclose of guisetstate close or hides the window
Valuater Posted December 8, 2006 Posted December 8, 2006 replace GUICtrlSetState($gmain,$GUI_HIDE) ; for controls only with GUISetState( @SW_HIDE, $gmain) 8)
dufran3 Posted December 8, 2006 Author Posted December 8, 2006 ahhh, I see that. I replaced and it is still not closing.
Valuater Posted December 8, 2006 Posted December 8, 2006 works for me #include <GUIConstants.au3> $gMain = GUICreate('Star Splash',500,100,-1,-1,$WS_POPUP,$WS_EX_TOPMOST) GUISetState() ;doing all my stuff....while the gui is displayed, all the actions are being performed in the background hidden...then Sleep(1000) ;CODE ;WinClose('Star Splash') GUISetState(@SW_HIDE, $gMain ) Sleep(1000) ;FileWriteLine($FileOpen, 'Script Finished ' & @MDAY & "-" & @MON & "-" & @YEAR & " " & @HOUR & ":" & @MIN & ":" & @SEC & @CRLF) ;FileClose($FileOpen) MsgBox(0,'','Upgrade is Complete') mostly as you posted 8)
Rick Posted December 9, 2006 Posted December 9, 2006 why not GuiDelete() ?? Who needs puzzles when we have AutoIt!!
dufran3 Posted December 9, 2006 Author Posted December 9, 2006 Adding the Sleep(1000) after it fixed it
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now