Jump to content

Closing GUI


dufran3
 Share

Recommended Posts

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

Link to comment
Share on other sites

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)

NEWHeader1.png

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