

       COUNTDN       Version  2.0      (C) 1994  by David C. Filmer



Distributed as FreeWare provided the distribution file is not altered.
("FreeWare" means that no payment is required - please distribute freely).

Included Files:  COUNTDN.EXE    The executable program
                 COUNTDN.TXT    The documentation (this file)
                          
(Note: documentation is also provided by just typing COUNTDN)

This program will launch any specified program (EXE, COM, or BAT) after a
countdown of a specified number of seconds.  The countdown may be aborted
and the program launched immediately by Pressing the ENTER key.   Pressing
the SPACE or ESC key will stop the countdown without launching the program.

This is ESPECIALLY useful for programs that run from the AUTOEXEC.BAT
file (like Windows) that you may not want to run EVERY time.  This is
easier than maintaining multiple configuration files.
                        
There are two ways to run COUNTDN: Regular mode and Advanced Mode.  The
difference is that regular mode is very easy to use, but adds a small amount
of memory overhead (3-4 K) to the launched program.  Advanced mode is a
little more complex to use, but does not take any memory from the launched
program.
                   



R E G U L A R    M O D E
========================

The command line is:    COUNTDN #SEC [/S | /Q] [d:][path]PROGRAM [parameters]

       where  #SEC         is the number of seconds to countdown (an integer)
              [d:][path]   is the drive spec and path (both optional)
              [/S | /Q]    Specifies Silent or Quiet Mode (see below)
              PROGRAM      is the name of the program (EXE, COM, or BAT)
              [parameters] are parameters passed to the launched program (opt)

 Examples:  COUNTDN 3 WIN /S     would run Windows in Standard Mode (/S)
                                 after a 3-second countdown.

            COUNTDN 3 /Q WIN /S  would run Windows in Standard Mode (/S) with
                                 COUNTDN running in Quiet Mode (/Q -one beep
                                 at start of count; silent thereafter).

            COUNTDN 3 /S WIN /S  would run Windows in Standard Mode (/S) with
                                 COUNTDN running in Silent Mode (/S - No Beep).
                                 In this case, both the launched program and
                                 COUNTDN use a /S parameter; this is not a
                                 problem.

The program/parameter list can be as complex as you like, such as:

            COUNTDN 3 ZEDIT thisfile.txt /s /v:100 /r /c /l-1 100:3 -W

#SEC must follow the COUNTDN command.  You must type a space after #SEC. 
If you use the optional Silent/Quiet Mode specification, the /Q or /S must
follow #SEC.  (In other words, don't mix up the command line).

COUNTDN and your specified application must be in your current directory or
in your path.  If you specify a path for the launched program, the path spec
applies only to the program itself (ie, COUNTDN does not actually change to
the specified path before executing the program).  I suggest you actually
change to the directory of your launched program before running COUNTDN;
otherwise your launched program may not be able to find data files (etc).
     
Also, COMMAND.COM must be in your current directory or in your path (it
usually is).  This applies only when running COUNTDN in Regular Mode.

COUNTDN does not verify that the path or program name is valid; your program
will run just as if you typed it from the DOS command line (ie, you will see
a DOS error message if you enter your command line incorrectly).

By default, COUNTDN will beep as the seconds are counted down.  You can
modify this in two ways:

     Quiet Mode (/Q):  COUNTDN will beep only once (at the beginning of the
                       count).
     
     Silent Mode (/S): COUNTDN will not beep at all.
                                                           
You cannot specify both /Q and /S.



A D V A N C E D    M O D E
==========================
  
In Regular Mode, COUNTDN actually launches the specified application under a
new COMMAND.COM - this has the effect of decreasing the available low memory
by a small (3 - 4K) amount. However, if the specified application barely able
to fit in memory, then it may not run under COUNTDN in Regular Mode.

Advanced Mode offers the capability of COUNTDN without taking any memory from
the launched program.  It does this by setting a standard DOS environment
variable called ErrorLevel.  Under Advanced Mode, if the countdown is aborted
by pressing the SPACE or ESC key, then ErrorLevel will be set to 0 (implying
that the program should NOT be launched).  If the countdown expires normally,
or if the countdown is terminated by the ENTER key, then ErrorLevel will be set
to 1 (implying that the program should be launched).

(If you're not familiar with ErrorLevel, don't let the name alarm you; the
usual use of this variable is to track system errors, but it can be used in
other ways as well.  It will not *cause* an error to happen.)

The syntax for COUNTDN in Advanced Mode is:

    COUNTDN #SEC [/S | /Q] /A
     
          where  #SEC       is the number of seconds to countdown (an integer)
                 [/S | /Q]  Optional; Specifies Silent/Quiet Mode (see above)
                 /A         indicates Advanced Mode (case doesn't matter)

          You cannot change the order of the command line.

In advanced mode, you do not specify the command line for the program you want 
to launch when you run COUNTDN.  It will be up to you (in your batch file) to 
actually check the ErrorLevel and run the program.

For example, to run COUNTDN in advanced mode with the intention of running
Windows (command line WIN) then your batch file would contain the following
two lines:

     COUNTDN 3 /A
     if ErrorLevel 1 WIN

This will produce a three-second countdown; if the countdown expires or the
ENTER key is pressed, ErrorLevel will be set to 1.  The program (Windows)
is actually launched by next line of the batch file.  If the SPACE bar (or
ESC) is pressed, then ErrorLevel will be set to 0; the IF condition will be
false and the program will not be launched.




I would REALLY appreciate any comments or suggestions for improving COUNTDN:

          David C. Filmer
          
          America On-Line ID:  DFilmer
          InterNet ID:         DFilmer@aol.com

Program upgrades will be posted to America On-Line.  AOL users who tell me
that they're using this program will be advised of upgrades via AOL Mail
(at least that's my intention; it may not be practical or possible for me
to do this (I haven't tried very large mailing lists in AOL; I don't know
what the limitations are).  All you need to do is say "Hi - I'm using COUNTDN"
or something like that, and I'll make every effort to notify you of upgrades.

Thanks!




REVISION HISTORY 

V 2.0   Uploaded to America On-Line Jan 1994.
        Added Advanced Mode (/A) to set ErrorLevel rather than shelling.
        Added "beep" to countdown, with /S and /Q (Silent/Quiet Mode) option.
        Uses color if color display is present (automatic detection).
        ESC key will also abort COUNTDN without launching (in addition to SPACE).
        
V 1.0   Initial Release - UpLoaded to America On-Line on 12/5/93.
        
        
