Jump to content

Countdown Display in Center of Screen


RobertH
 Share

Recommended Posts

Is there a way to use SplashTextOn to smoothly display a countdown in the center of the screen? Similar to what this ToolTip command is doing.

; This will create a tooltip in the upper left of the screen that counts down from 5 to 1.
ToolTip("This is counting to 5.", 0, 0)
Sleep(1000) ;Sleep to give tooltip time to display.
ToolTip("This is counting to 4.", 0, 0)
Sleep(1000)
ToolTip("This is counting to 3.", 0, 0)
Sleep(1000)
ToolTip("This is counting to 2.", 0, 0)
Sleep(1000)
ToolTip("This is counting to 1.", 0, 0)
Sleep(1000)
Link to comment
Share on other sites

Yes, and the help file basically shows you exactly how to do it too.

Thanubis, thank you for your informative and thought provoking reply :D However, I should have included somewhere in my original post that I took a look at the help file before posting. I will keep that in mind for any future post that I may make. The help file demonstrates how to get SplashTextOn to display a sequential line of numbers vertically. If I remove the @LF I can get SplashTextOn to display the same sequential numbers horizontally. What I am attempting to figure out is if I can display a countdown from HighNumber to LowNumber using SplashTextOn. I only want to display the number for Sleep(1000) then erase it before the next number appears. Similar to the ToolTip code that I posted. There is no flicker and only the number changes while the background seemingly stays the same. I am not a programmer, although most of the time I can hack my way through a program and get a rough idea of what is going on. I want to use the countdown SpashTextOn to display on our emergency room monitors to let ER personel know that things are still running in the background and they just have to wait the specified amount of time until the main program starts back up. I already use SplashTextOn to display a static message "Please wait while xxx program starts" but I would like to give the viewer an idea of how long they have to wait. The ToolTip code does exactly what I want to do and I would use it if I could figure out how to make the text larger.

Link to comment
Share on other sites

whatever Edited by MvGulik

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Link to comment
Share on other sites

Compare this

$message = $message & $x & @LF
to this
$message = $x & @LF
and your set to go.

Thanks MvGulik, I didn't realize it was so simple. I feel so sheepish :D . Check out the finished product.

; Application Starting Countdown
$X = 0
$Y = 30
$message = ""
$message1 = "Application Starting in " & $message
SplashTextOn("Please wait!", $message, 480, 80, -1, -1, 4, "", 30)
While $Y > $X
    $message = $Y & @LF
    ControlSetText("Please wait!", "", "Static1", $message1 & $message)
    sleep(1000)
    $Y = $Y - 1
WEnd
Edited by RobertH
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...