home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 8 / CDASC08.ISO / VRAC / CLKTIM31.ZIP / CLKTIMER.DOC < prev    next >
Text File  |  1993-05-28  |  21KB  |  420 lines

  1.      CLKTIMER - Clock and task performing TSR (v3.10)
  2.                 Copyright 1993 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, booting 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,w,x][u,a,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.  Arguments can be concatenated upto the allowed
  36.               length of the command line (or a maximum of 256 characters).
  37.  
  38.               Recognized arguments which must follow immediately after the
  39.               slash are (case not significant):
  40.  
  41.                    a = set alarm time and message
  42.                        can set only one time for each of 24 hours per day;
  43.                        alarm will both chime and display the specified
  44.                        message; chime will end when the next key is pressed
  45.                        by the user; message displayed for one minute.
  46.  
  47.                    b = set boot time
  48.                        can set only one time for each of 24 hours per day;
  49.                        computer will boot at the beginning of the minute
  50.                        of the hour specified
  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
  69.  
  70.                    r = set repeat time (minutes after the hour) and command
  71.                        can set only one time for the task to be repeated
  72.                        each hour
  73.  
  74.                    s = display the current task settings
  75.  
  76.                    w = set time to wait until executing a command
  77.                        can set only one time increment (hours and minutes)
  78.                        from the current time for the task to be executed
  79.  
  80.                    x = set execute time and command
  81.                        can set only one time for each of 24 hours per day;
  82.                        this task is aware of the user and will not
  83.                        interrupt or interfere with any DOS program
  84.  
  85.                    ? = force a reboot to occur instead of a keyboard task
  86.  
  87.               Secondary flags which must follow immediately after the
  88.               argument character are:
  89.  
  90.                    a = mark this task to be done only if a DOS program is
  91.                        not running at the specified time
  92.  
  93.                    u = mark this task to be done at the specified time, even
  94.                        if a DOS program is running
  95.  
  96.                    d = delete the task previously set for the time specified
  97.  
  98.              For example:
  99.  
  100.                CLKTIMER /a 12:00 'LUNCH TIME'     set an alarm for 12:00
  101.                                                   (noon) to display the
  102.                                                   message LUNCH TIME
  103.  
  104.                CLKTIMER /ad 12:00                 disable the alarm
  105.                                                   previously set for 12:00,
  106.                                                   but keep the same display
  107.                                                   string
  108.  
  109.               Specifying the time is done in a 24 hour format for alarm
  110.               times, boot times and time to execute a task, and uses two
  111.               number separated by a colon ( : ); a zero will be assumed if
  112.               the number of minutes is not specified.  For the repeat time
  113.               (minutes after the hour) and the idle time (number of
  114.               seconds) only a single number is used.  Hours must be in the
  115.               range [0..23], minutes and seconds must be in the range
  116.               [0..59].  A blank in the time specification will be assumed
  117.               to be a zero.
  118.  
  119.               The command string or alarm display string are after the time
  120.               specification for the argument.  The string is generally a
  121.               combination of text delimited by quote marks ( ' ) and
  122.               representations of special keystrokes.  Special keystrokes
  123.               include any decimal ASCII representation of a keystroke (for
  124.               example the carriage return or enter key is 013), or a scan
  125.               code which begins with the at sign ( @ ).  Scan codes are not
  126.               tested for accuracy, only inserted into the keystroke buffer.
  127.               Therefore, extended keyboard scan codes can be used if your
  128.               computer recognized an extended keyboard.  Since the keyboard
  129.               buffer is manipulated directly, there can be a maximum of 16
  130.               keystrokes specified.  If a command string begins with the
  131.               question mark character ( ? ), this is interpreted to mean
  132.               that a reboot is desired instead of pushing the string into
  133.               the keyboard buffer.  The remainder of the command string
  134.               is ignored, and a reboot begins immediately.
  135.  
  136.               The first time the program is run, the task settings
  137.               specified are loaded with the TSR version of the program.  If
  138.               the program is already loaded, then the arguments will modify
  139.               the task settings of the TSR version of the program (i.e.
  140.               will change the memory resident data storage).  The program
  141.               will run in high memory, but cannot find itself in high
  142.               memory for subsequent commands.
  143.  
  144.      DEFAULTS:
  145.               a     time defaults to 00:00
  146.                     display defaults to a null string or previous setting
  147.                     task is DOS unaware
  148.                     there are no alarms set initially
  149.  
  150.               b     boot time defaults to 00:00
  151.                     task is DOS unaware
  152.                     there are not boot times set initially
  153.  
  154.               c     clock display defaults to off
  155.                     task is DOS unaware
  156.  
  157.               d     date and clock display defaults to off
  158.                     task is DOS unaware
  159.  
  160.               h     hour chime defaults to off (not sounded)
  161.                     task is DOS unaware
  162.  
  163.               i     time defaults to 300 seconds
  164.                     command defaults to 'C:\IDLE' 013 or previous setting
  165.                     task is DOS aware
  166.                     the idler timer defaults to off
  167.  
  168.               r     time defaults to 00 minutes after each hour
  169.                     command defaults to 'C:\REPEAT' 013 or previous setting
  170.                     task is DOS aware
  171.                     there is no repeat time set initially
  172.  
  173.               w     time defaults to 00:00 increment from the current time
  174.                     command defaults to 'C:\WAIT' 013 or previous setting
  175.                     task is DOS aware
  176.                     there is not wait time set initially
  177.  
  178.               x     time defaults to 00:00
  179.                     command defaults to 'C:\EXECUTE' 013 or previous setting
  180.                     task is DOS aware
  181.                     there are no execute times set initially
  182.  
  183.      EXAMPLES:
  184.               CLKTIMER /a 16:45 'Clean up time'
  185.                    set an alarm task for 4:45 pm to display  Clean up time
  186.  
  187.               CLKTIMER /b2:59
  188.                    set a task to boot the computer at 2:59 am
  189.  
  190.               CLKTIMER /c /h
  191.                    set two tasks, one to display the clock in the upper
  192.                    right hand corner of the display (this will disable the
  193.                    date display if previously set) and one to toggle the
  194.                    hour chime (will be turned on if this is the first time
  195.                    CLKTIMER is run)
  196.  
  197.               CLKTIMER /D
  198.                    set a task to display the date and time in the upper
  199.                    right hand corner of the display
  200.  
  201.               CLKTIMER /h
  202.                    toggle the hour chime (turn it on if previously off, or
  203.                    turn it off if previously on)
  204.  
  205.               CLKTIMER /I 60
  206.                    set a task to monitor the idle status of the computer
  207.                    and to start the program C:\IDLE after the computer has
  208.                    been idle for 60 seconds
  209.  
  210.               CLKTIMER /i60 'C:\bat\idle.bat' 013
  211.                    set a task to monitor the idle status of the computer
  212.                    and to start the batch program C:\BAT\IDLE.BAT after the
  213.                    computer has been idle for 60 seconds
  214.  
  215.               CLKTIMER /ru55
  216.                    set a task to start the program C:\REPEAT at 55 minutes
  217.                    after every hour (24 hours per day); task will be DOS
  218.                    unaware (will be done even if a DOS program is running)
  219.  
  220.               CLKTIMER /S
  221.                    display the current status and list of tasks set for the
  222.                    copy of CLKTIMER which is resident in memory (TSR)
  223.  
  224.               CLKTIMER /w1:00 'wait_1hr' 13
  225.                    set a task that at 1 hr and 00 minutes from the current
  226.                    time will start the program WAIT_1HR (the DOS PATH will
  227.                    be searched for the program)
  228.  
  229.               CLKTIMER /w1:00'?reboot'
  230.                    set a task that at 1 hr and 00 minutes from the current
  231.                    time will reboot the computer
  232.  
  233.               CLKTIMER /x9:20 'at9_20' 13
  234.                    set a task that at 9:20 am will start the program AT9_20
  235.                    (the DOS PATH will be searched for the program)
  236.  
  237.               CLKTIMER /da /h /i120 /a12:00'LUNCH TIME' /B2
  238.                    set a task to display date and time (date and time task
  239.                    is DOS aware, and so will not display if a DOS program
  240.                    is running), toggle the hour chime, set a task to monitor
  241.                    the idle status and start the program C:\IDLE after 120
  242.                    seconds of being idle, set an alarm task to display
  243.                    LUNCH TIME  at 12:00 (noon) and set a task to boot the
  244.                    computer at 2:00 am
  245.  
  246.      CAUTIONS: DOS BIOS calls have been used as much as possible
  247.               to help maintain compatibility with different operating
  248.               system implementations.  The major exception is the direct
  249.               manipulation of the keyboard buffer and getting the time bytes
  250.  
  251.               Time information is take directly from the BIOS data area,
  252.               and so program may not work correctly if your BIOS does not
  253.               follow PC-DOS convention for location of this information.
  254.  
  255.               Date information is obtained from DOS when the program is
  256.               first run, and then updated internally.  It should be aware
  257.               of leap years, and varying number of days per month.  Changing
  258.               the date from the command line will not change the date
  259.               displayed by CLKTIMER
  260.  
  261.               The information written to the screen is updated
  262.               approximately once each second.  If it scrolls off the top of
  263.               the screen, wait one second and it should reappear.
  264.  
  265.               Software interrupt 66h is used to communicate between the
  266.               currently running version of the program and the TSR version
  267.               in memory.  This is an arbitrary choice, and can be changed
  268.               in your registered version if you tell me which software
  269.               interrupt you desire to use.
  270.  
  271.               CLKTIMER looks for itself only in low memory.  Therefore, it
  272.               is recommended that the program not be loaded high using
  273.               DOS 5.0 or similar utilities.
  274.  
  275.               The time, date and alarm information will only be displayed
  276.               for 40 or 80 column text modes (int 10h, modes 0-3 and 7).
  277.               In other screen modes, all other functions (including chimes)
  278.               still work.
  279.  
  280.               Windows 3.0: the boot feature and the chimes will work when
  281.               Windows is running; there will be no screen display unless
  282.               you have a DOS window running with the correct screen mode;
  283.               the function of the keystroke buffer under Windows has not
  284.               been investigated.
  285.  
  286.      UPGRADES: Version 2.01 fixed timer jump error which caused date to be
  287.               incremented after each minute of the first hour of the day;
  288.               changed time routine to get timer information directly from
  289.               BIOS data area instead of using 1Ah interrupt; moved repeat
  290.               code so that it is executed only if DOS is not active
  291.               (as specified in documentation).  31Aug92
  292.  
  293.               Version 2.02 fixed jump error caused by change to repeat code
  294.               in version 2.01;  execute command now performs correctly, when
  295.               previously the code was being skipped; also decreased size
  296.               of execute strings by 1 so their size matches specifications.
  297.               11Sep92
  298.  
  299.               Version 2.03 fixed jump error causing alarm information to not
  300.               be displayed when clock time or date information were not
  301.               displayed.  24Sep92
  302.  
  303.               Version 2.04 fixed problem with location of crt status byte
  304.               which was causing the computer to lock up if switched from
  305.               VGA to MDA mode.  23Oct92
  306.  
  307.               Version 2.1 added /w command to wait specified hours and
  308.               minutes from current time to stuff a command to keyboard.
  309.               05Oct92
  310.  
  311.               Version 3.0 added the secondary U and A flag to signify for
  312.               each task type whether they should be DOS unaware (U) or
  313.               aware (A).  The default awareness level of each task remains
  314.               are specified in version 2.xx.  Also added division routine
  315.               so that time displayed is correctly 18.2065 ticks per second.
  316.               Changed the format of the display and logic to show only task
  317.               events which are active.  Fixed problem with conflict between
  318.               wait task and boot tasks.  29Nov92
  319.  
  320.               Version 3.1 added the capability for any command string to be
  321.               a reboot command if the string begins with the ? character.
  322.  
  323.      DISCLAIMER: The program described above has been tested with MSDOS 3.3
  324.               and MSDOS 5.0, and when running under 4DOS and NDOS using
  325.               several hardware clones.  While it appears to perform
  326.               consistently as described, there is absolutely no guarantee
  327.               that it will do anything.  The author will not be responsible
  328.               for any loss or damages caused through the use of this
  329.               program.  No warranty, express or implied, is provided for
  330.               this software, it's performance, or it's usefulness for a
  331.               particular purpose.
  332.  
  333.               All trademarks mentioned are the property of their respective
  334.               owners.
  335.  
  336.               The program is Copyright 1993 by Roger Brook.
  337.  
  338.               You are encouraged to distribute this program under the
  339.               following conditions:
  340.  
  341.                  - all files contained in the archive or distribution disk
  342.                    must be distributed together in UNMODIFIED form
  343.  
  344.                  - you charge no more than a reasonable fee for copying or
  345.                    subscription, and clearly indicate that payment of such
  346.                    a fee does NOT grant ownership of the program
  347.  
  348.               You may evaluate this program for up to 30 days on a free
  349.               trial basis.  After 30 days, you should register your
  350.               continued use of this program.  The registration fee is $10
  351.               for use on a single computer (please specify disk size
  352.               desired), payable to the author at the address given below.
  353.               Site license requests in writing will be considered.
  354.  
  355.               Realistically, I don't expect to get rich from this effort.
  356.               Registration will get you a copy of the latest version of the
  357.               software, without the registration encouragement blurb.  I
  358.               will listen to and attempt to incorporate suggestions from
  359.               registered users.  If your suggestion is used, you will
  360.               receive a free copy of the updated program.
  361.  
  362.               Send comments and registration to:
  363.  
  364.                    Roger Brook
  365.                    523 Oakdale Drive
  366.                    Haslett MI 48840
  367.  
  368.               I do have a CompuServe and a Prodigy account, but I do not
  369.               monitor them on a regular basis.  If you want to send
  370.               your comments by electronic mail, sent them to either:     2
  371.  
  372.                    internet        BROOK@MAILBOX.AGE.MSU.EDU
  373.                    bitnet          BROOK@MSUEGR
  374.  
  375.  
  376. ------------------------------------------------------------------------
  377.  
  378.                 REGISTRATION REQUEST FORM
  379.  
  380.  
  381.      PROGRAM:                        # COPIES:            AMOUNT:
  382.  
  383.      CLKTIMER v3.1  ($10 per copy)   _________          $______________
  384.  
  385.           Diskette Type Required:  5-1/4" (360K) ___
  386.  
  387.                                    3-1/2" (720K) ___
  388.  
  389.      TOTAL. . . . . . . . . . . . . . . . . . . . . . . $______________
  390.  
  391.  
  392.      PAYMENT BY:
  393.  
  394.      Check/Money Order No.__________ enclosed for $____________________
  395.  
  396.  
  397.      SHIPPING ADDRESS:
  398.  
  399.      NAME                ______________________________________________
  400.  
  401.      ADDRESS LINE 1      ______________________________________________
  402.  
  403.      ADDRESS LINE 2      ______________________________________________
  404.  
  405.      CITY/STATE/PROVINCE ______________________________________________
  406.  
  407.      COUNTRY/POSTAL CODE ______________________________________________
  408.  
  409.      DAYTIME PHONE       ______________________________________________
  410.  
  411.      FAX PHONE           ______________________________________________
  412.  
  413.      SEND TO:       Roger Brook
  414.                     523 Oakdale Drive
  415.                     Haslett  MI  48840
  416.  
  417. ------------------------------------------------------------------------
  418.  
  419.  
  420.