Category : Utilities for DOS and Windows Machines
Archive   : CLKTM20S.ZIP
Filename : CLKTIMER.DOC

 
Output of file : CLKTIMER.DOC contained in archive : CLKTM20S.ZIP
CLKTIMER - Clock and task performing TSR (v2.0s)
Copyright 1992 by Roger Brook

MEMORY REQUIREMENT: less than 5K bytes

INTERRUPT VECTORS ATTACHED: 09h, 1Ch, 21h, 22h, 66h

PURPOSE: A TSR to perform tasks at designated times. Tasks that can
be performed include displaying the current time (and
optionally date) in the upper right hand corner of the
screen, sounding and displaying an alarm in the upper left
hand corner of the screen, rebooting the computer, and
forcing keystrokes into the keystroke buffer to start or
terminate a DOS program.

Keystroke tasks (a sequence of keystrokes) can be performed
at a set time, each hour at a specified number of minutes
after the hour, or after the computer has been idle for a
specified number of seconds.

CLKTIMER is intended to used in a batch file to set up a
sequence of tasks to be performed on an unattended basis.
CLKTIMER can be run anytime, with new tasks added to the list
of tasks to be performed, or old tasks disabled.

SYNTAX: CLKTIMER /[a,b,c,d,i,r,x][d] [nn[:nn]] [string]

The slash is interpreted as the start of another delimited
argument on the command line; therefore every argument must
begin with a slash. The square brackets in the syntax line
above denote optional parameters, and should not be used as a
part of the arguments. Recognized arguments are listed
below. Any unrecognized argument will cause the program to
display a help screen of information similar to this syntax
section.

Recognized arguments which must follow immediately after the
slash are (case not significant):

a = set alarm time and message
can set only one time for each of 24 hours per day;
alarm will both chime and display the specified
message; chime will end when the next key is pressed
by the user; message displayed for one minute.

b = set reboot time
can set only one time for each of 24 hours per day;
computer will reboot at the beginning of the minute
of the hour specified; it is not sensitive to
whatever is happening (i.e. ignorant of any user).

c = set clock only display
will disable date display if it was previously set;
display is in reverse video in the upper right hand
corner of the screen

d = set clock and date display
will override clock only display if it was
previously set; display is in reverse video in the
upper right hand corner of the screen

h = toggle chime for sounding the hour; if set to sound
chime at the beginning of each hour, the chime will
be disabled; if the chime was disabled (default) it
will be set to chime at the beginning of each hour

i = set idle time (seconds) and command
idle time count is reset for each key pressed by the
user; this task is aware of the user and will not
interrupt or interfere with any DOS program

r = set repeat time (minutes after the hour) and command
can set only one time for the task to be repeated
each hour; this task is aware of the user and will
not interrupt or interfere with any DOS program;
task will be skipped if a DOS program is active at
the beginning of the minute specified

s = display the current task settings

x = set execute time and command
can set only one time for each of 24 hours per day;
this task is aware of the user and will not
interrupt or interfere with any DOS program; task
will be skipped if a DOS program is active at the
beginning of the minute of the hour specified

Specifying the time is done in a 24 hour format for alarm
times, reboot times and time to execute a task, and uses two
number separated by a colon ( : ); a zero will be assumed if
the number of minutes is not specified. For the repeat time
(minutes after the hour) and the idle time (number of
seconds) only a single number is used. Hours must be in the
range [0..23], minutes and seconds must be in the range
[0..59]. A blank in the time specification will be assumed
to be a zero.

The command string or alarm display string are after the time
specification for the argument. The string is generally a
combination of text delimited by quote marks ( ' ) and
representations of special keystrokes. Special keystrokes
include any decimal ASCII representation of a keystroke (for
example the carriage return or enter key is 013), or a scan
code which begins with the at sign ( @ ). Scan codes are not
tested for accuracy, only inserted into the keystroke buffer.
Therefore, extended keyboard scan codes can be used if your
computer recognized an extended keyboard. Since the keyboard
buffer is manipulated directly, there can be a maximum of 16
keystrokes specified.

An argument can be used to disable as task by putting the
letter d immediately after the argument letter. Even
though the task is turned off, the associated string remains
as specified. For example:

CLKTIMER /a 12:00 'LUNCH TIME' set an alarm for 12:00
(noon) to display the
message LUNCH TIME

CLKTIMER /ad 12:00 disable the alarm
previously set for 12:00,
but keep the same display
string
The first time the program is run, the task settings
specified are loaded with the TSR version of the program. If
the program is already loaded, then the arguments will modify
the task settings of the TSR version of the program (i.e.
will change the memory resident data storage).

DEFAULTS:
a time defaults to 00:00
display defaults to a null string or previous setting
there are no alarms set initially

b reboot time defaults to 00:00
there are not reboot times set initially

c clock display defaults to off

d date and clock display defaults to off

h hour chime defaults to off (not sounded)

i time defaults to 300 seconds
command defaults to 'C:\IDLE' 013 or previous setting
the idler timer defaults to off

r time defaults to 00 minutes after each hour
command defaults to 'C:\REPEAT' 013 or previous setting
there is no repeat time set initially

x time defaults to 00:00
command defaults to 'C:\EXECUTE' 013 or previous setting
there are no execute times set initially

EXAMPLES:

CLKTIMER /a 16:45 'Clean up time'
set an alarm task for 4:45 pm to display Clean up time

CLKTIMER /b2:59
set a task to reboot the computer at 2:59 am

CLKTIMER /c /h
set two tasks, one to display the clock in the upper
right hand corner of the display (this will disable the
date display if previously set) and one to toggle the
hour chime (will be turned on if this is the first time
CLKTIMER is run)

CLKTIMER /D
set a task to display the date and time in the upper
right hand corner of the display

CLKTIMER /h
toggle the hour chime (turn it on if previously off, or
turn it off if previously on)

CLKTIMER /I 60
set a task to monitor the idle status of the computer
and to start the program C:\IDLE after the computer has
been idle for 60 seconds

CLKTIMER /i60 'C:\bat\idle.bat' 013
set a task to monitor the idle status of the computer
and to start the batch program C:\BAT\IDLE.BAT after the
computer has been idle for 60 seconds

CLKTIMER /r55
set a task to start the program C:\REPEAT at 55 minutes
after every hour (24 hours per day)

CLKTIMER /S
display the current status and list of tasks set for the
copy of CLKTIMER which is resident in memory (TSR)

CLKTIMER /x9:20 'at9_20' 13
set a task that at 9:20 am will start the program AT9_20
(the DOS PATH will be searched for the program)

CLKTIMER /d /h /i120 /a12:00'LUNCH TIME' /R2
arguments can be concatenated upto the allowed length of
the command line (or 256 characters);
set a task to display date and time, toggle the hour
chime, set a task to monitor the idle status and start
the program C:\IDLE after 120 seconds of being idle, set
an alarm task to display LUNCH TIME at 12:00 (noon) and
set a task to reboot the computer at 2:00 am

CAUTIONS: DOS BIOS calls have been used as much as possible
to help maintain compatibility with different operating
system implementations. The major exception is the direct
manipulation of the keyboard buffer.

The BIOS call to get the current clock time (int 1Ah) will
reset the flag for midnight (24 hours since last read) which
will interfere with other TSR's which use this flag.

Date information is obtained from DOS when the program is
first run, and then updated internally. It should be aware
of leap years, and varying number of days per month.

The information written to the screen is updated
approximately once each second. If it scrolls off the top of
the screen, wait one second and it should reappear.

Software interrupt 66h is used to communicate between the
currently running version of the program and the TSR version
in memory. This is an arbitrary choice, and can be changed
in your registered version if you tell me which software
interrupt you desire to use.

The time, date and alarm information will only be displayed
for 40 or 80 column text modes (int 10h, modes 0-3 and 7).
In other screen modes, all other functions (including chimes)
still work.

Windows 3.0: the reboot feature and the chimes will work when
Windows is running; there will be no screen display unless
you have a DOS window running; the function of the keystroke
buffer under Windows has not been investigated.

DISCLAIMER: The program described above has been tested with MSDOS 3.3
and MSDOS 5.0, and when running under 4DOS and NDOS using
several hardware clones. While it appears to perform
consistently as described, there is absolutely no guarantee
that it will do anything. The author will not be responsible
for any loss or damages caused through the use of this
program. No warranty, express or implied, is provided for
this software, it's performance, or it's usefulness for a
particular purpose.

All trademarks mentioned are the property of their respective
owners.

The program is Copyright 1992 by Roger Brook.

You are encouraged to distribute this program under the
following conditions:

- all files contained in the archive or distribution disk
must be distributed together in UNMODIFIED form

- you charge no more than a reasonable fee for copying or
subscription, and clearly indicate that payment of such
a fee does NOT grant ownership of the program

You may evaluate this program for up to 30 days on a free
trial basis. After 30 days, you should register your
continued use of this program. The registration fee is $10
for use on a single computer (please specify disk size
desired), payable to the author at the address given below.
Site license requests in writing will be considered.

Realistically, I don't expect to get rich from this effort.
Registration will get you a copy of the latest version of the
software, without the registration encouragement blurb. I
will listen to and attempt to incorporate suggestions from
registered users. If your suggestion is used, you will
receive a free copy of the updated program. I will likely
ignore un-registered free loaders.

Send comments and registration to:

Roger Brook
523 Oakdale Drive
Haslett MI 48840

I do have a CompuServe and a Prodigy account, but I do not
monitor them on a regular basis. If you want to send
your comments by electronic mail, sent them to either:

internet [email protected]
bitnet BROOK@MSUEGR



  3 Responses to “Category : Utilities for DOS and Windows Machines
Archive   : CLKTM20S.ZIP
Filename : CLKTIMER.DOC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/