Branching in a Batch File based on the Real-Time Clock?
Saturday, February 21, 2009 at 11:39 am Windows 98 Annoyances Discussion Forum
Posted by gewg_
(3932 messages posted)
Robert Blanda wrote:
|I run a Specials Menu on a large LCD TV at a restaurant using powerpoint.
|There are two specials files (lunch.pps and dinner.pps)
|When this system reboots,
|i want a batch file to determine which powerpoint file to open
|based on what time it is.
|[. . .]
|I figured since you can determine time and date within a batch file,
|can't you do an if /then/else type script within a batch?
|(if its *this time* then load THIS application)
|
Unfortunately, DOS can't do arithmetic from the command line
(not even greater than or less than commands--only equals).
To do what you asked, you would have to include
an IF statement for **every** possible iteration of the RTC.
What you need is a real programming language.
With every OS it shipped, M$ *used* to include a QBASIC interpreter
(a stripped-down version of its QuickBASIC compiler). No mas.[1]
cache of http://www.skeeterbytes.com/pc/cabs/981.htm
That's not really a huge deal, however:
http://www.google.com/search?q=Download-QBASIC
...or even
http://www.google.com/search?q=Download-QuickBASIC
Here in the 21st Century, there are many, many options, e.g.:
http://www.thefreecountry.com/compilers/basic.shtml
http://www.google.com/search?q=Python-for-Windows
[1] ...and to get in my usual dig at M$, the big general-purpose GNU/Linux distros
have ALWAYS shipped with GCC (the GNU Compiler Collection).
- Written in response to:
- Batch File Help? (Robert Blanda: Saturday, February 21, 2009 at 9:25 am)
Responses to this message:
|
|
All messages in this thread [show all]
 |  | Branching in a Batch File based on the Real-Time Clock? (gewg_: Sat, Feb 21, 2009, 11:39 am) |
| |
| |
Return to the Windows 98 Discussion Forum
|
|