Jump to content

Can be done to display counter to MsgBox()


eJan
 Share

Recommended Posts

I'm trying to make MsgBox() which close after 10 seconds but to display remaining time to close, or I have to make GUI and update control with data.

Global $i

;ProgressOn("Progress Meter", "Increments every second", "0 percent")
$msg = MsgBox(0, "", "Time: " & $i, 10)

For $i = 10 to 1 step -1
    sleep(1000)
    GUICtrlSetData($msg, $i)
   ;ProgressSet( $i, $i & " percent")
Next
;ProgressSet(100 , "Done", "Complete")
;sleep(500)
;ProgressOff()
Link to comment
Share on other sites

Thanks Nuffilein805 but I need that only for Msgbox() - O.K. I will create gui for that purpose.

If $shut = $GUI_CHECKED Then
            $ask0 = MsgBox(4, "USB Backup", "Backup complete." & @CRLF & "Shutdown computer?", 10)
            While 1
                If $ask0 = -1 Or $ask0 = 6 Then; YES
                    Shutdown(1)
                Else
                    Exit
                EndIf
            WEnd
        ElseIf $shut = $GUI_UNCHECKED Then
            MsgBox(0, "USB Backup", "Backup was completed.", 10)
            Exit
        EndIf
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...