Jump to content
Sign in to follow this  
Jon Mason

Time Count Down

Recommended Posts

I'm pushing out an app that requires a reboot, but the installer does not do it on it's own. I want to give the user the chance to reboot on there own, but I'm going to nag them about it. Pardon my logic, but it works for me.

The only part I'm stuck on is the splash screen and the time count down. I don't know if this is stupid or not, but I wanted to throw this out to see what you all thought. I want the seconds to show as 2 digits instead of just 1 when it gets into the single digits. "09" instead of just "9"

$loop = 1
$answer1=MsgBox(4, $loop,"Reboot?")
if $answer1 = 6 then 
    $loop = $loop + 1

    $answer2=MsgBox(4, $loop,"Reboot?")
    if $answer2 = 6 then 
    $loop = $loop + 1
Until $loop > 3

$timeMin = 4
$timeSec = 10

SplashTextOn("Engineering", "Your PC will reboot in:" & @CR & $timeMin & ":" & $timeSec, 100, 50)
$timeSec = $timeSec-1
if $timeSec < 0 Then
    $timeSec = 59
    $timeMin = $timeMin - 1
Until $timeMin = 0


Func _shutdown()
    MsgBox(0, "", "SHUTDOWN(2)")

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...