home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / tsr / clktm20s.zip / CLKTIMER.DOC < prev    next >
Text File  |  1992-05-07  |  16KB  |  296 lines

  1.      CLKTIMER - Clock and task performing TSR (v2.0s)
  2.                 Copyright 1992 by Roger Brook
  3.      
  4.      MEMORY REQUIREMENT: less than 5K bytes
  5.      
  6.      INTERRUPT VECTORS ATTACHED: 09h, 1Ch, 21h, 22h, 66h
  7.      
  8.      PURPOSE: A TSR to perform tasks at designated times.  Tasks that can 
  9.               be performed include displaying the current time (and 
  10.               optionally date) in the upper right hand corner of the 
  11.               screen, sounding and displaying an alarm in the upper left 
  12.               hand corner of the screen, rebooting the computer, and 
  13.               forcing keystrokes into the keystroke buffer to start or 
  14.               terminate a DOS program.
  15.  
  16.               Keystroke tasks (a sequence of keystrokes) can be performed 
  17.               at a set time, each hour at a specified number of minutes 
  18.               after the hour, or after the computer has been idle for a 
  19.               specified number of seconds.
  20.      
  21.               CLKTIMER is intended to used in a batch file to set up a 
  22.               sequence of tasks to be performed on an unattended basis.  
  23.               CLKTIMER can be run anytime, with new tasks added to the list 
  24.               of tasks to be performed, or old tasks disabled.  
  25.      
  26.      SYNTAX:  CLKTIMER /[a,b,c,d,i,r,x][d] [nn[:nn]] [string]
  27.      
  28.               The slash is interpreted as the start of another delimited 
  29.               argument on the command line; therefore every argument must 
  30.               begin with a slash.  The square brackets in the syntax line 
  31.               above denote optional parameters, and should not be used as a 
  32.               part of the arguments.  Recognized arguments are listed 
  33.               below.  Any unrecognized argument will cause the program to 
  34.               display a help screen of information similar to this syntax 
  35.               section.
  36.      
  37.               Recognized arguments which must follow immediately after the 
  38.               slash are (case not significant):
  39.      
  40.                    a = set alarm time and message
  41.                        can set only one time for each of 24 hours per day; 
  42.                        alarm will both chime and display the specified 
  43.                        message; chime will end when the next key is pressed 
  44.                        by the user; message displayed for one minute.
  45.      
  46.                    b = set reboot time
  47.                        can set only one time for each of 24 hours per day; 
  48.                        computer will reboot at the beginning of the minute 
  49.                        of the hour specified; it is not sensitive to 
  50.                        whatever is happening (i.e. ignorant of any user).
  51.      
  52.                    c = set clock only display
  53.                        will disable date display if it was previously set; 
  54.                        display is in reverse video in the upper right hand 
  55.                        corner of the screen
  56.      
  57.                    d = set clock and date display
  58.                        will override clock only display if it was 
  59.                        previously set; display is in reverse video in the 
  60.                        upper right hand corner of the screen
  61.      
  62.                    h = toggle chime for sounding the hour; if set to sound 
  63.                        chime at the beginning of each hour, the chime will 
  64.                        be disabled; if the chime was disabled (default) it 
  65.                        will be set to chime at the beginning of each hour
  66.      
  67.                    i = set idle time (seconds) and command
  68.                        idle time count is reset for each key pressed by the 
  69.                        user; this task is aware of the user and will not 
  70.                        interrupt or interfere with any DOS program
  71.      
  72.                    r = set repeat time (minutes after the hour) and command
  73.                        can set only one time for the task to be repeated 
  74.                        each hour; this task is aware of the user and will 
  75.                        not interrupt or interfere with any DOS program; 
  76.                        task will be skipped if a DOS program is active at 
  77.                        the beginning of the minute specified
  78.      
  79.                    s = display the current task settings
  80.      
  81.                    x = set execute time and command
  82.                        can set only one time for each of 24 hours per day; 
  83.                        this task is aware of the user and will not 
  84.                        interrupt or interfere with any DOS program; task 
  85.                        will be skipped if a DOS program is active at the 
  86.                        beginning of the minute of the hour specified
  87.      
  88.               Specifying the time is done in a 24 hour format for alarm 
  89.               times, reboot times and time to execute a task, and uses two 
  90.               number separated by a colon ( : ); a zero will be assumed if 
  91.               the number of minutes is not specified.  For the repeat time 
  92.               (minutes after the hour) and the idle time (number of 
  93.               seconds) only a single number is used.  Hours must be in the 
  94.               range [0..23], minutes and seconds must be in the range 
  95.               [0..59].  A blank in the time specification will be assumed 
  96.               to be a zero.  
  97.      
  98.               The command string or alarm display string are after the time 
  99.               specification for the argument.  The string is generally a 
  100.               combination of text delimited by quote marks ( ' ) and 
  101.               representations of special keystrokes.  Special keystrokes 
  102.               include any decimal ASCII representation of a keystroke (for 
  103.               example the carriage return or enter key is 013), or a scan 
  104.               code which begins with the at sign ( @ ).  Scan codes are not 
  105.               tested for accuracy, only inserted into the keystroke buffer.  
  106.               Therefore, extended keyboard scan codes can be used if your 
  107.               computer recognized an extended keyboard.  Since the keyboard 
  108.               buffer is manipulated directly, there can be a maximum of 16 
  109.               keystrokes specified.
  110.      
  111.               An argument can be used to disable as task by putting the 
  112.               letter  d  immediately after the argument letter.  Even 
  113.               though the task is turned off, the associated string remains 
  114.               as specified.  For example:
  115.      
  116.                CLKTIMER /a 12:00 'LUNCH TIME'     set an alarm for 12:00 
  117.                                                   (noon) to display the 
  118.                                                   message LUNCH TIME
  119.      
  120.                CLKTIMER /ad 12:00                 disable the alarm 
  121.                                                   previously set for 12:00, 
  122.                                                   but keep the same display 
  123.                                                   string
  124.               The first time the program is run, the task settings 
  125.               specified are loaded with the TSR version of the program.  If 
  126.               the program is already loaded, then the arguments will modify 
  127.               the task settings of the TSR version of the program (i.e. 
  128.               will change the memory resident data storage).
  129.      
  130.      DEFAULTS: 
  131.               a     time defaults to 00:00
  132.                     display defaults to a null string or previous setting
  133.                     there are no alarms set initially
  134.      
  135.               b     reboot time defaults to 00:00
  136.                     there are not reboot times set initially
  137.      
  138.               c     clock display defaults to off
  139.      
  140.               d     date and clock display defaults to off
  141.      
  142.               h     hour chime defaults to off (not sounded)
  143.      
  144.               i     time defaults to 300 seconds 
  145.                     command defaults to 'C:\IDLE' 013 or previous setting
  146.                     the idler timer defaults to off
  147.      
  148.               r     time defaults to 00 minutes after each hour
  149.                     command defaults to 'C:\REPEAT' 013 or previous setting
  150.                     there is no repeat time set initially
  151.      
  152.               x     time defaults to 00:00
  153.                     command defaults to 'C:\EXECUTE' 013 or previous setting
  154.                     there are no execute times set initially
  155.      
  156.      EXAMPLES:
  157.      
  158.               CLKTIMER /a 16:45 'Clean up time'
  159.                    set an alarm task for 4:45 pm to display  Clean up time 
  160.      
  161.               CLKTIMER /b2:59
  162.                    set a task to reboot the computer at 2:59 am 
  163.      
  164.               CLKTIMER /c /h
  165.                    set two tasks, one to display the clock in the upper 
  166.                    right hand corner of the display (this will disable the 
  167.                    date display if previously set) and one to toggle the 
  168.                    hour chime (will be turned on if this is the first time 
  169.                    CLKTIMER is run)
  170.      
  171.               CLKTIMER /D
  172.                    set a task to display the date and time in the upper 
  173.                    right hand corner of the display
  174.      
  175.               CLKTIMER /h
  176.                    toggle the hour chime (turn it on if previously off, or 
  177.                    turn it off if previously on)
  178.      
  179.               CLKTIMER /I 60
  180.                    set a task to monitor the idle status of the computer 
  181.                    and to start the program C:\IDLE after the computer has 
  182.                    been idle for 60 seconds
  183.      
  184.               CLKTIMER /i60 'C:\bat\idle.bat' 013
  185.                    set a task to monitor the idle status of the computer 
  186.                    and to start the batch program C:\BAT\IDLE.BAT after the 
  187.                    computer has been idle for 60 seconds
  188.      
  189.               CLKTIMER /r55 
  190.                    set a task to start the program C:\REPEAT at 55 minutes 
  191.                    after every hour (24 hours per day)
  192.      
  193.               CLKTIMER /S
  194.                    display the current status and list of tasks set for the 
  195.                    copy of CLKTIMER which is resident in memory (TSR)
  196.      
  197.               CLKTIMER /x9:20 'at9_20' 13
  198.                    set a task that at 9:20 am will start the program AT9_20 
  199.                    (the DOS PATH will be searched for the program)
  200.      
  201.               CLKTIMER /d /h /i120 /a12:00'LUNCH TIME' /R2
  202.                    arguments can be concatenated upto the allowed length of 
  203.                    the command line (or 256 characters);
  204.                    set a task to display date and time, toggle the hour 
  205.                    chime, set a task to monitor the idle status and start 
  206.                    the program C:\IDLE after 120 seconds of being idle, set 
  207.                    an alarm task to display LUNCH TIME at 12:00 (noon) and 
  208.                    set a task to reboot the computer at 2:00 am
  209.      
  210.      CAUTIONS: DOS BIOS calls have been used as much as possible 
  211.               to help maintain compatibility with different operating 
  212.               system implementations.  The major exception is the direct 
  213.               manipulation of the keyboard buffer.
  214.      
  215.               The BIOS call to get the current clock time (int 1Ah) will 
  216.               reset the flag for midnight (24 hours since last read) which 
  217.               will interfere with other TSR's which use this flag.  
  218.      
  219.               Date information is obtained from DOS when the program is 
  220.               first run, and then updated internally.  It should be aware 
  221.               of leap years, and varying number of days per month.
  222.      
  223.               The information written to the screen is updated 
  224.               approximately once each second.  If it scrolls off the top of 
  225.               the screen, wait one second and it should reappear.
  226.      
  227.               Software interrupt 66h is used to communicate between the 
  228.               currently running version of the program and the TSR version 
  229.               in memory.  This is an arbitrary choice, and can be changed 
  230.               in your registered version if you tell me which software 
  231.               interrupt you desire to use.
  232.      
  233.               The time, date and alarm information will only be displayed 
  234.               for 40 or 80 column text modes (int 10h, modes 0-3 and 7).  
  235.               In other screen modes, all other functions (including chimes) 
  236.               still work.
  237.      
  238.               Windows 3.0: the reboot feature and the chimes will work when 
  239.               Windows is running; there will be no screen display unless 
  240.               you have a DOS window running; the function of the keystroke 
  241.               buffer under Windows has not been investigated.
  242.      
  243.      DISCLAIMER: The program described above has been tested with MSDOS 3.3 
  244.               and MSDOS 5.0, and when running under 4DOS and NDOS using 
  245.               several hardware clones.  While it appears to perform 
  246.               consistently as described, there is absolutely no guarantee 
  247.               that it will do anything.  The author will not be responsible 
  248.               for any loss or damages caused through the use of this 
  249.               program.  No warranty, express or implied, is provided for 
  250.               this software, it's performance, or it's usefulness for a 
  251.               particular purpose. 
  252.      
  253.               All trademarks mentioned are the property of their respective 
  254.               owners.
  255.      
  256.               The program is Copyright 1992 by Roger Brook.  
  257.      
  258.               You are encouraged to distribute this program under the 
  259.               following conditions:
  260.      
  261.                  - all files contained in the archive or distribution disk 
  262.                    must be distributed together in UNMODIFIED form
  263.      
  264.                  - you charge no more than a reasonable fee for copying or 
  265.                    subscription, and clearly indicate that payment of such 
  266.                    a fee does NOT grant ownership of the program
  267.      
  268.               You may evaluate this program for up to 30 days on a free 
  269.               trial basis.  After 30 days, you should register your 
  270.               continued use of this program.  The registration fee is $10 
  271.               for use on a single computer (please specify disk size 
  272.               desired), payable to the author at the address given below.  
  273.               Site license requests in writing will be considered.
  274.      
  275.               Realistically, I don't expect to get rich from this effort.  
  276.               Registration will get you a copy of the latest version of the 
  277.               software, without the registration encouragement blurb.  I 
  278.               will listen to and attempt to incorporate suggestions from 
  279.               registered users.  If your suggestion is used, you will 
  280.               receive a free copy of the updated program.  I will likely 
  281.               ignore un-registered free loaders.
  282.      
  283.               Send comments and registration to:
  284.      
  285.                    Roger Brook
  286.                    523 Oakdale Drive
  287.                    Haslett MI 48840
  288.      
  289.               I do have a CompuServe and a Prodigy account, but I do not 
  290.               monitor them on a regular basis.  If you want to send 
  291.               your comments by electronic mail, sent them to either:
  292.      
  293.                    internet        BROOK@MAILBOX.AGE.MSU.EDU
  294.                    bitnet          BROOK@MSUEGR
  295.      
  296.