I'm curious to know if a countdown timer can be created and have it display in a window. For example, I have our ScoreKeeper script that runs the scores and then the TWGS Online activity script. I've written the ScoreKeeper so that when it loads, a menu comes up for the SysOp to enter in some information, such as what game letters to run scores on, path to write the score html files, path and filename of the TWGS Online activity html file, their site name, and timezone. I also recently added the feature to have 3 choices for the timer- 15 minutes, 30 minutes, or 60 minutes.
When the script is activated, I have a window that opens up giving me the status of the ScoreKeeper. In the window it displays the game letters I've chosen, the timer choice (ex: 15 minutes), my paths for the files. I also have put the ability to press the ~ key to return to the ScoreKeeper menu and make changes.
When the script activates and when the time is reached, the scores for the game letters chosen are run, and returns back to the timer again. What I am looking to do is, in the window where it has the line "15 minutes", show how much time is remaining. I've attached a screenshot of the window.
This is the code I am using for the menu portion of the timer:
Code:
elseif ($menuChoice = 2)
echo ansi_10 "*Select the timer delay in minutes to run scores:"
echo ansi_11 "*(3) 15 minutes, (4) 30 minutes, (5) 60 minutes"
getConsoleInput $timer singlekey
if ($timer = 3)
setVar $timer "15"
saveVar $timer
elseif ($timer = 4)
setVar $timer "30"
saveVar $timer
elseif ($timer = 5)
setVar $timer "60"
saveVar $timer
end