home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / batch / batkit.zip / BATKIT.DOC < prev    next >
Text File  |  1993-09-08  |  49KB  |  1,061 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                                       BatKit
  10.  
  11.                                   Utilities for
  12.                                    Batch Files
  13.  
  14.                                         by
  15.  
  16.                                     Ken Hipple
  17.                              [72241,65 or 74076,2331]
  18.                                 All Right Reserved
  19.  
  20.             [Including: GetKey, SaveDir, Wait, GetScrn, and MakeScrn]
  21.  
  22.  
  23.                           Copyright 1988,89,90,92,93 by
  24.  
  25.                                     Ken Hipple
  26.                                311 Summer Oak Trail
  27.                                 Madison, MS 39110
  28.  
  29.  
  30.  
  31.      BatKit   ver. 5.4                9/1/93                          Page: 2
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.                         T A B L E   O F   C O N T E N T S
  40.  
  41.      GETKEY...................................................3
  42.           OVERVIEW............................................3
  43.           USING GETKEY........................................4
  44.                Usage..........................................4
  45.                Response Editing...............................4
  46.           COMMAND LINE........................................5
  47.           DISPLAYING TEXT.....................................9
  48.                # control character............................9
  49.                @ control character............................9
  50.           GETKEY 4.x AND GETSTRNG COMPATIBILITY...............14
  51.  
  52.      WAIT.....................................................15
  53.  
  54.      SAVEDIR..................................................16
  55.  
  56.      GETSCRN..................................................17
  57.  
  58.      USING THE DOS ENVIRONMENT................................18
  59.  
  60.      REGISTERING BatKit.......................................20
  61.  
  62.      DISTRIBUTION NOTICE......................................21
  63.  
  64.      CHANGES SINCE RELEASE 5.0................................22
  65.  
  66.  
  67.  
  68.      BatKit   ver. 5.4                9/1/93                          Page: 3
  69.  
  70.  
  71.  
  72.      GETKEY OVERVIEW:
  73.  
  74.        GetKey is a utility program designed for use in batch files.  Its main
  75.      function is to make batch files interactive by allowing the user to
  76.      enter a response to a prompt or question.  A menu system can be created
  77.      by using GetKey, some text files, and some batch files.  Other uses
  78.      include displaying text files or messages, and playing tones.
  79.  
  80.        With GetKey you can use a single batch (BAT) file and a single text
  81.      file to control the operation of a system from startup to shutdown.
  82.  
  83.        GetKey has been tested with MS-DOS versions 2.1 through 6.0.  Features
  84.      of GetKey include:
  85.  
  86.       - Returns an ERRORLEVEL for all    - Option to wait for RETURN key
  87.         keys including function keys       before accepting a response
  88.  
  89.       - Option to insert response        - Can wait a given time for a
  90.         into the environment               response and then continue
  91.  
  92.       - Fast text display & screen       - Can display a file, message or
  93.         handling                           both
  94.  
  95.       - Optional response echoing        - Can display a section of a file
  96.  
  97.       - Optional bad response message    - Flexible color handling
  98.  
  99.       - Option to delete bad responses   - Time and date display options
  100.  
  101.       - Optional beep on bad response    - Does display delays and pauses
  102.  
  103.       - Built-in help screens            - 'Smart' clear screen function
  104.  
  105.       - Clear type-ahead buffer option   - Screen mode switching
  106.  
  107.       - Background tone playing          - Optional response validation
  108.  
  109.       - Adjustable max. response length  - Can trim spaces from response
  110.  
  111.       - Option to force uppercase        - Defaults can be modified
  112.  
  113.       - Screen blanking
  114.  
  115.  
  116.  
  117.      BatKit   ver. 5.4                9/1/93                          Page: 4
  118.  
  119.  
  120.  
  121.      USING GETKEY:
  122.  
  123.         When executed, GetKey displays any file or message specified and then
  124.      waits for the user to enter a response.  You can specify the maximum
  125.      acceptable response length.  Responses can be validated if you desire.
  126.      The ASCII value of the first letter of the response is returned to the
  127.      batch file in ERRORLEVEL.  The response also can be placed into the
  128.      environment.  The values returned by function keys are their extended
  129.      ASCII value plus 128.  These values are:
  130.  
  131.                          F1-F10    SHIFT F1-F10   CTRL F1-F10   ALT F1-F10
  132.      Value Returned:     187-196     212-221        222-231      232-241
  133.                      F11:  133         135            137          139
  134.                      F12:  134         136            138          140
  135.                     (Note: F11 and F12 will not work on some systems)
  136.  
  137.      Usage:
  138.        GetKey  [?] [/A] [/B] [/C] [/D] [/E] [/F"filename[@s]"] [/G["char"]]
  139.                [/H] [/I] [/K"chars" | /KF"filename[@s]"] [/Lnnn] [/M"msg"]
  140.                [/N["char"]] [/O] [/P] [/PI] [/R] [/S] [/T] [/U] [/V["var"]]
  141.                [/Wnnnn] [/X] [/Z] [/BL[nn]] [/YM] [/Y"program"]
  142.  
  143.      Items in [] are optional.  The character | means or (for example, you
  144.      can use /K or /KF but not both together).  Most parameters can have a +
  145.      or - appended to them (ex. /B- or /G+"*").  See below for which
  146.      parameters can use this.  Note that any place GetKey expects a number
  147.      you may enter it in decimal or hexadecimal.  To use hexadecimal add a &
  148.      in front of the number.  For example, &A0 is the same as 160.
  149.  
  150.      Response Editing:
  151.  
  152.      The following edit keys can be used during response entry:
  153.  
  154.      Home -         Moves the cursor to the first character of the response.
  155.  
  156.      End -          Moves the cursor to the right end of the response.
  157.  
  158.      Left Arrow -   Moves the cursor left one space.
  159.  
  160.      Right Arrow -  Moves the cursor right one space.
  161.  
  162.      Ins -          Toggles Insert/Overstrike mode.  A large cursor indicates
  163.                     Insert mode is active.
  164.  
  165.      Del -          Deletes the character under the cursor.
  166.  
  167.      Backspace -    Deletes the character to the left of the cursor.
  168.  
  169.      Esc -          Deletes the entire response.
  170.  
  171.  
  172.  
  173.      BatKit   ver. 5.4                9/1/93                          Page: 5
  174.  
  175.  
  176.  
  177.      COMMAND LINE SWITCHES for GetKey:
  178.  
  179.      In the descriptions below the default setting for a parameter is shown
  180.      in brackets ([]).  Use a parameter's command line switch to override its
  181.      default setting.  Most of these defaults can be changed by using the /O
  182.      switch to patch GETKEY.EXE.
  183.  
  184.      Many of the parameters are either on or off.  Using the parameter's
  185.      switch will toggle the parameter from its default setting to the
  186.      opposite setting.  You can force these parameters ON or OFF by using +
  187.      or - after the parameter's switch (i.e. /A+ or /G-).
  188.  
  189.      GetKey returns an ERRORLEVEL of 128 if a command line error is
  190.      encountered.
  191.  
  192.      All command line parameters can be specified in the environment by using
  193.      the environment variable GETKEY.  For example, if you enter 'SET
  194.      GETKEY=/m"This is a test: "' at the DOS prompt then every time you run
  195.      GetKey the specified message will be displayed.  If a parameter is also
  196.      specified on the command line then that setting will override the
  197.      setting in the environment.
  198.  
  199.      Where a parameter shows quotes being used you can use a colon (:)
  200.      instead.  In some of these places any character may be used.  In these
  201.      cases the character you use in place of the first quote be will become
  202.      the delimiter.
  203.  
  204.      /A  - Makes the RETURN key be one of the Acceptable responses for GetKey
  205.            (see /K and /KF).  If not used with the /K|/KF parameter it makes
  206.            the RETURN key be the only acceptable response. [off]
  207.  
  208.      /B  - Toggles the setting for the error Beep produced by an invalid
  209.            response to GetKey (see /K|/KF) and Ctrl-G beeps. [on]
  210.  
  211.      /BL - Toggles screen blanking.  If no argument is given blanking will
  212.            occur after the default time [10].  /BLnn will cause blanking to
  213.            occur after nn minutes. [on]
  214.  
  215.      /C  - Toggles the Clear screen setting.  The screen is cleared using
  216.            either the original screen colors or the last colors set by
  217.            GetKey.  GetKey determines the original screen colors by looking
  218.            at the attributes at the cursor position that was current when
  219.            GetKey was called.  This means that the color the cursor is when
  220.            you invoke GetKey is the color it thinks the screen is. [off]
  221.  
  222.      /D  - Toggles the 'Delete (erase) unacceptable response' setting  (see
  223.            /K|/KF). [off]
  224.  
  225.      /E  - Toggles the setting for displaying an Error message when the user
  226.            enters an unacceptable response (see /K|/KF). [off]
  227.  
  228.  
  229.  
  230.      BatKit   ver. 5.4                9/1/93                          Page: 6
  231.  
  232.  
  233.      /F  - Causes GetKey to display the File "filename".  Using the syntax
  234.            "filename@s" causes GetKey to display only section s of the file.
  235.            See 'Displaying Text' below for more information.
  236.  
  237.      /G  - Toggles the setting for a Guide line.  When ON, it displays a
  238.            guide line showing the maximum acceptable length of the response.
  239.            Use /G"char" to change the character used for the line.  The
  240.            initial default is an underline [_], but this can be changed using
  241.            the /O option. [off]
  242.  
  243.      /H  - Causes the built-in Help screens to be displayed.  (same as ?)
  244.  
  245.      /I  - Toggles the 'Incompatible display adapter' setting.  When ON it
  246.            forces GetKey to use an 80x25 screen.  (Known to be needed for
  247.            some AT&T adapters.) [off]
  248.  
  249.      /K  - Makes the list of characters entered ("chars") be the only
  250.            acceptable Keys for GetKey.  GetKey will not continue processing
  251.            until the user presses one of these keys.  Use this option when
  252.            you are looking for one character responses.  For multi-character
  253.            responses use /KF.  When this option is used with responses of
  254.            length greater than 1 only the first character of the response is
  255.            checked.  For example, if one of the characters in "chars" is a 1
  256.            than any response starting with a 1 will be accepted.  To make a
  257.            function key or a character not on the keyboard an acceptable
  258.            character, enter the appropriate value using the ALT-Numeric Key
  259.            Pad method. For example, to make F1 an acceptable key, hold down
  260.            the ALT key, press 1, then 8, and then 7 using the numeric key pad
  261.            and then release the ALT key.  (See /U for case sensitivity)
  262.  
  263.      /KF - Makes the responses in the file "filename" the only acceptable
  264.            responses.  Response files can be broken into sections the same as
  265.            display files using the "filename@s" syntax.  Response files must
  266.            be ASCII text files with each response delimited by a carriage
  267.            return or a carriage return/line feed.  This is the format
  268.            produced by EDLIN, EDIT or by doing 'COPY CON filename'.  Most
  269.            word processing packages have an option to produce this type of
  270.            file also.  Be careful when using this or the /K option.  It is
  271.            very easy to get 'trapped'.  For example, your response file
  272.            doesn't have any single character responses in it and you start
  273.            GetKey without overriding its default maximum response length
  274.            setting of 1.  (see /U for case sensitivity)
  275.  
  276.      /L  - Sets the maximum allowable Length of the response.  nnn can be any
  277.            value from 0 to 255.  A value of 0 means that the user cannot
  278.            enter any characters.  This would make GetKey act similar to the
  279.            PAUSE command in a batch file. [1]
  280.  
  281.      /M  - GetKey displays the Message "msg" on the screen before waiting for
  282.            the user's response.
  283.  
  284.      /N  - Toggles GetKey response echoing.  Normally, when the user presses
  285.            a key, that key is displayed (if it is a displayable character).
  286.            Use /N"char" to change the default 'fill-in' character.  For
  287.  
  288.  
  289.  
  290.      BatKit   ver. 5.4                9/1/93                          Page: 7
  291.  
  292.  
  293.            example, if you are using GetKey to enter passwords you might like
  294.            to use the command /N"*". [on]
  295.  
  296.      /O  - Change Option's defaults.  GetKey's default settings are shown on
  297.            the first help screen as highlighted fields.  You can change these
  298.            defaults by using the /O option.  Items that can be changed are:
  299.            /B, /BL, /BLnn, /C, /D, /E, /G, /G"char", /I, /L, /N, /N"char",
  300.            /P, /R, /S, /T, /U, /V, /V"var", /X, and /Z.  Be careful about
  301.            changing defaults once you are using GetKey in several places.  If
  302.            an existing batch file toggles a setting, and you change that
  303.            setting's default, your batch file might stop working.
  304.  
  305.      /P  - Prevents (disables) GetKey snow checking on CGA monitors.  This
  306.            will speed up screen displays, so if your CGA adapter doesn't
  307.            produce 'snow', or you don't mind it, use this option or set it
  308.            using /O.  Actually, this switch toggles the default snow checking
  309.            setting.  If you have a video adapter that GetKey thinks is not a
  310.            CGA then GetKey automatically turns snow checking off.  If this
  311.            produces 'snow' on your screen you may need to use /P. [off]
  312.  
  313.      /PI - Allow PIping.  Use when you want to 'pipe' a response into GetKey.
  314.            Do not use with /R turned on unless the text to be piped ends with
  315.            a carriage return.
  316.  
  317.            Example: GetKey /PI < RESPOND.TXT
  318.                          GetKey receives input of any text in RESPOND.TXT as
  319.                          if it had been entered from the keyboard.
  320.  
  321.      /R  - Toggles the 'RETURN key Required' setting.  When ON, GetKey will
  322.            not act on a response until RETURN is pressed.  When OFF a
  323.            response is accepted as soon as the maximum number of characters
  324.            have been entered. [off]
  325.  
  326.      /S  - GetKey can be configured to add a Carriage Return-Line Feed
  327.            sequence after an accepted response.  This option toggles the
  328.            default setting. [off]
  329.  
  330.      /T  - Toggles the 'Trim leading and trailing spaces' function. [on]
  331.  
  332.      /U  - Toggles the 'force response to UPPERcase' setting.  This switch
  333.            also affects how response checking operates.  When Uppercase is
  334.            ON, response checking is NOT case sensitive.  This means that if
  335.            "Ab" is an acceptable response, a user could enter: "AB", "ab",
  336.            "Ab", or "aB", and GetKey would accept it.  When Uppercase is OFF
  337.            response checking IS case sensitive.  In this case the ONLY
  338.            acceptable response would be: "Ab". [on]
  339.  
  340.      /V  - Toggles the 'insert response into the environment' setting.  Sets
  341.            the Variable name to be used to "var".  If "var" is not used
  342.            GetKey uses the default value [GK]. [off]
  343.  
  344.      /W  - Tells GetKey to Wait for a given number of seconds before
  345.            continuing.  If no response is entered before the wait period is
  346.            up, an ERRORLEVEL of 0 is returned to the batch file otherwise
  347.  
  348.  
  349.  
  350.      BatKit   ver. 5.4                9/1/93                          Page: 8
  351.  
  352.  
  353.            ERRORLEVEL is set as it normally would be.  /W0 is a special
  354.            situation.  When it is used, GetKey does not wait for a key to be
  355.            entered.  Unless there is a character in the buffer, an ERRORLEVEL
  356.            of 0 is returned.
  357.  
  358.      /X  - Toggles GetKey CTRL-BREAK checking.  Text displaying is slower
  359.            with checking ON.  When ON a user can break out of GetKey by using
  360.            CTRL-BREAK. [off]
  361.  
  362.      /Y  - When GetKey is run from some DOS shell programs (Such as TREE86 or
  363.            HOT) it can not find the environment (see /V) using its normal
  364.            method.  This switch can be used to correct this problem in some
  365.            cases.  For example, if you are using TREE86 try using /Y"TREE86"
  366.            if you are having a problem getting the /V option working.
  367.  
  368.      /YM - If GetKey is being run from a DOS 'shell' (such as some program's
  369.            'Go to DOS' feature) then normally GetKey will only affect the
  370.            environment (see /V) of the program it is running under.  This
  371.            switch tells GetKey to also make any changes to the main (or root)
  372.            environment.  This option does not work in Windows.
  373.  
  374.      /Z  - Toggles the 'clear (Zap) the type-ahead buffer' function in
  375.            GetKey. [off]
  376.  
  377.  
  378.      +|- - The above options that toggle a setting can also be used to force
  379.            the setting ON or OFF by adding a + (ON) or - (OFF) to the
  380.            parameter.  For example, /C+ forces screen clearing ON and /C-
  381.            forces it OFF.  This syntax is safer if you plan on modifying the
  382.            GetKey default settings using the /O parameter.  The toggle syntax
  383.            provides for a shorter command line entry for those users who plan
  384.            on sticking with a given GetKey setup and retains compatibility
  385.            with earlier versions of GetKey.  A + or - can be used with /A,
  386.            /B, /C, /D, /E, /G, /I, /N, /P, /R, /S, /T, /U, /V, /X, and /Z.
  387.  
  388.  
  389.  
  390.      BatKit   ver. 5.4                9/1/93                          Page: 9
  391.  
  392.  
  393.  
  394.      DISPLAYING TEXT:
  395.  
  396.         GetKey has two methods of displaying text.  The /M option can be used
  397.      for short messages or prompts.  With this method you can display as much
  398.      text as you have room for on the command line.  The /F method allows you
  399.      to display a file so the amount of text you can display is limited only
  400.      by your disk space.  Both methods can be used together.  If they are the
  401.      file is displayed first.  With both methods you can perform special
  402.      functions through the use of # and @ control character sequences.  Note
  403.      that all letters that are used in a control sequence MUST be UPPER case.
  404.  
  405.         In the case where the control sequence requires a numeric argument
  406.      you can enter the argument in decimal or hexadecimal form.  To use
  407.      hexadecimal preface the number with & (ex. &1A).  You do not need to pad
  408.      the argument to its full length with leading zeros.  Use caution if you
  409.      don't because GetKey will use the wrong value if the control sequence is
  410.      immediately in front of a word starting with 0 through 9 or, if using
  411.      hexadecimal, A through F.  For example, #&1Apple will be seen as the
  412.      color combination #&1A followed by the word "pple" instead of the color
  413.      combination #&01 followed by the word Apple.  Forcing control sequence
  414.      letters to be entered as upper case lessens the possibility of this but
  415.      does not prevent it.
  416.  
  417.         The # control character is used specifically for screen color or
  418.      attribute control.  Hexadecimal is convenient to use for colors because
  419.      the first digit will represent the background setting and the second the
  420.      foreground.  For example, #&10 sets the colors to a foreground color of
  421.      0 (black) and the background color to 1 (blue).  The syntax is #&hh
  422.      where &hh is a hexadecimal number.  To see all of the 256 possible
  423.      color/attribute combinations enter GetKey/f"colors" at the DOS prompt.
  424.      GetKey must be able to find the colors file for this to work.  To
  425.      display the # character itself use ## in your message or file.
  426.  
  427.         The @ control character is used for various functions.  To display
  428.      the @ character itself use @@.  The @ control sequences are:
  429.  
  430.      @/d...d     - Execute the / command line parameters found between the
  431.                    delimiting characters d.  Any command line parameter may
  432.                    be used however the /C, /I, and /? will not have any
  433.                    effect.  The /F parameter can cause unexpected results in
  434.                    some cases but in most it will appear to be ignored.
  435.                    Using the /M parameter will display the message one time.
  436.                    If you use @JH this means that when re-displaying the
  437.                    screen after a help message the /M message will not
  438.                    appear.
  439.  
  440.                    Example: @/~/k"abc"/z/e~
  441.  
  442.      @Bnnnr[#ccc]d...d
  443.                  - Bounce bars.  Create bounce bar number nnn which will
  444.                    return response r.  The bar will be displayed as the
  445.                    reverse of the existing colors unless a color is specified
  446.                    with #ccc.  The character d is the delimiter marking off
  447.  
  448.  
  449.  
  450.      BatKit   ver. 5.4                9/1/93                         Page: 10
  451.  
  452.  
  453.                    the text (indicated above as ...) to be included in the
  454.                    bar.  d must be a character that is not used in the
  455.                    included text.
  456.  
  457.                    Example: @B2S#&10\S. Spreadsheets\
  458.                               Creates the second bounce bar which will return
  459.                               a response of S.  The text included in the bar
  460.                               will be 'S. Spreadsheets'.  The color used to
  461.                               display the bar will be &10.
  462.  
  463.      @BZ         - Bounce bar Zap.  Clears previously entered bounce bars.
  464.                    Bounce bars are also cleared when a new section is
  465.                    displayed.
  466.  
  467.      @C          - Clears the screen.  This is the same as the /C command
  468.                    line parameter except that it may be used anywhere in the
  469.                    file or message.
  470.  
  471.      @CR+        - Turns the CuRsor ON.
  472.  
  473.      @CR-        - Turns the CuRsor OFF.
  474.  
  475.      @DD         - Displays the Date in the form MM/DD/YY, updated as needed.
  476.  
  477.      @DD+        - Turn Display Date function on.  Only needed if you've used
  478.                    @DD-.
  479.  
  480.      @DD-        - Turn Display Date function off.  This is only useful if
  481.                    you display text on top of an area where the date is being
  482.                    displayed.  The date may bleed through in this situation
  483.                    unless you use @DD-.
  484.  
  485.      @DT         - Displays the Time in the form HH:MM:SS, continuously
  486.                    updated.
  487.  
  488.      @DT+        - Turn Display Time function on.  Only needed if you've used
  489.                    @DT-.
  490.  
  491.      @DT-        - Turn Display Time function off.  This is only useful if
  492.                    you display text on top of an area where the time is being
  493.                    displayed.  The time will bleed through in this situation
  494.                    unless you use @DT-.
  495.  
  496.      @DV(var)    - Displays the environment Variable named 'var' (e.g. PATH).
  497.                    GetKey will begin displaying the variable at the location
  498.                    where it finds @DV and will stop when the contents of the
  499.                    variable have been completely displayed or at the first
  500.                    non-space character.
  501.  
  502.                    Example: /M"Path=@DV(path)          Date=@DT"
  503.                               The first 10 characters of the PATH will be
  504.                               displayed.
  505.  
  506.  
  507.  
  508.      BatKit   ver. 5.4                9/1/93                         Page: 11
  509.  
  510.  
  511.      @Fnnn       - Flashes the screen nnn times.  If nnn is not given the
  512.                    default value of 1 is used.
  513.  
  514.      @H          - Homes the cursor (to upper left corner) without clearing
  515.                    the screen.  This parameter can be used to "overlay"
  516.                    screens. (see @X and @Y for other cursor positioning
  517.                    commands)
  518.  
  519.      @JH"k1s1[k2s2][k3s3][...]"
  520.                  - Jump to Help.  If key kn is pressed then section sn is
  521.                    displayed.  GetKey will then wait for a key to be pressed.
  522.                    When one is the section that set up the help keys will be
  523.                    re-displayed.  Note that any keys used as help keys can
  524.                    not be included in the response entered by the user.
  525.  
  526.                    Example: @JH"1A2B"
  527.                               If a 1 is pressed the help screen labeled A is
  528.                               displayed.  If a 2 is pressed the help screen
  529.                               labeled B is displayed.
  530.  
  531.      @JIs        - Jump Immediately to section s and begin displaying the
  532.                    text in that section.
  533.  
  534.      @JK"k1s1[k2s2][k3s3][...]"
  535.                  - Jump on Key kn to section sn and begin displaying the text
  536.                    in that section.
  537.  
  538.                    Example: @JK"1A2B"
  539.                               Wait for a key to be pressed.  If the key is a
  540.                               1 jump to section A.  If a 2 is pressed jump to
  541.                               section B.  Ignore anything else.
  542.  
  543.      @JOs"k1s1[k2s2][k3s3][...]"
  544.                  - Jump on key kn to section sn Otherwise if the key pressed
  545.                    is not in the list then jump to section s.
  546.  
  547.                    Example: @JOC"1A2B"
  548.                               Wait for a key to be pressed.  If the key is a
  549.                               1 jump to section A.  If a 2 is pressed jump to
  550.                               section B.  If anything else is pressed jump to
  551.                               section C.
  552.  
  553.      @JPs        - Jump to section s after Pausing for a key to be pressed.
  554.  
  555.      @JWnnns     - Jump to section s after a wait delay of nnn clock ticks.
  556.                    There are 18.2 clock ticks per second.
  557.  
  558.      @Ls         - Labels a section as section s, where s is any character.
  559.                    When used with the /F"filename@s" syntax this allows you
  560.                    to display sections of a file instead of the whole file.
  561.                    GetKey will display all of the file from the start of the
  562.                    given section to the end of the file or the start of the
  563.                    next section.  Sections are found very quickly - even
  564.                    those near the end of large files.  If a file with
  565.  
  566.  
  567.  
  568.      BatKit   ver. 5.4                9/1/93                         Page: 12
  569.  
  570.  
  571.                    sections is displayed using the syntax /F"filename", then
  572.                    the first section is displayed.  File sectioning can also
  573.                    be used in the same way for response files. (see /KF).
  574.  
  575.      @Mxx        - Switches screen Modes.  xx may be a number or the letter
  576.                    O.  Use the O to return the screen to the mode it was in
  577.                    when GetKey was invoked.  Use the command with caution
  578.                    since some of the modes won't display text.  Values of xx
  579.                    above 7 should only be used when you know what the results
  580.                    will be.  If you try a mode over 7 and your monitor
  581.                    doesn't support that mode then there is a remote
  582.                    possibility of monitor damage.
  583.  
  584.      @MRxx       - Set the left MaRgin to xx spaces.  Use this command when
  585.                    you want all lines displayed to be indented by xx spaces.
  586.  
  587.      @O          - Returns the screen colors and attributes to the Original
  588.                    start-up values (the cursor color when GetKey was
  589.                    executed).
  590.  
  591.      @P          - Makes GetKey Pause text displaying until the user presses
  592.                    a key.  The key pressed is discarded.  Useful when you
  593.                    want to display more than one screen of text.
  594.  
  595.      @R          - Set cursor position for Response.  Normally, GetKey waits
  596.                    for input wherever the display file (or message) ends.  To
  597.                    force the user response to be entered at some other
  598.                    position on the screen, imbed @R at that point in the
  599.                    display file.
  600.  
  601.      @Snnn       - 'Shifts' the screen's colors.  The number entered is added
  602.                    to the current color at each screen position.  If nnn is
  603.                    not given the default value of 1 is used.
  604.  
  605.      @Tnnn#nnnnn - Generates a Tone.  The nnn parameter is the duration.  The
  606.                    #nnnnn parameter is the frequency.  The higher the number
  607.                    entered for the frequency, the lower the frequency.  Both
  608.                    parameters are optional, however use care when following
  609.                    an @T with a color change (#) command.  @T is the
  610.                    equivalent of @T2#&400.  To play a 'rest' use a frequency
  611.                    of 0 (i.e. @T#0).  Tones are played in the background.
  612.                    This means text displaying and key entry can be occurring
  613.                    while tones are being played.
  614.  
  615.      @TF         - Tone Flush.  Clears all tones from the tone buffer.
  616.  
  617.      @TRnnn[Ttt] - Tone Repeat.  Repeat the last tone or the last tt tones
  618.                    nnn times.  Up to 128 tones can be repeated.
  619.  
  620.                    Example: @TR5T10  - repeat the last 10 tones 5 times
  621.  
  622.      @Vs["var"]  - When a response is entered put the section label s in the
  623.                    environment Variable var.  If var is not given GKSECT is
  624.                    used.
  625.  
  626.  
  627.  
  628.      BatKit   ver. 5.4                9/1/93                         Page: 13
  629.  
  630.  
  631.  
  632.      @Wnnnnn     - Causes GetKey to delay (Wait) text displaying for the
  633.                    period nnnnn.  The waiting period used is not machine
  634.                    dependent.  In other words @W10 will delay the display the
  635.                    same length of time no matter what machine it is being run
  636.                    on.  @W18 provides a delay of approximately 1 second.  If
  637.                    nnnnn is not given the default value of 18 is used.  The
  638.                    maximum value for nnnnn is 65535.
  639.  
  640.      @Xddd       - Positions the cursor to column ddd or &hh (where the
  641.                    leftmost column is 000).  Note that -ddd or +ddd positions
  642.                    the cursor ddd positions to the left or right of the
  643.                    current position (relative positioning).
  644.  
  645.      @Yddd       - Positions the cursor to row ddd or &hh (where the top row
  646.                    is 000).  Note that -ddd or +ddd positions the cursor ddd
  647.                    rows above or below the current position (relative
  648.                    positioning).
  649.  
  650.           The text file to display a screen can be created and edited with
  651.      any ASCII text editor.  Most of ours were done with WordPerfect because
  652.      of its convenient line drawing feature.  However, adding the #
  653.      parameters to control colors, etc. can be tedious.  We have a utility to
  654.      aid in screen preparation.  MakeScrn will convert a screen image file
  655.      into a GetKey text file automatically.  The screen image must be in the
  656.      format used by the PC Magazine PAINT program, which can be used for
  657.      creating screens from scratch.  If you have another way of painting
  658.      screens in color (or want to capture existing screens), you can use our
  659.      GetScrn program to capture screens to an image file.
  660.  
  661.  
  662.  
  663.      BatKit   ver. 5.4                9/1/93                         Page: 14
  664.  
  665.  
  666.  
  667.  
  668.  
  669.      GETKEY 4.x AND GETSTRNG COMPATIBILITY:
  670.  
  671.        GetKey 5.x is highly compatible with pre-5.x versions of GetKey and
  672.      GetStrng.  5.2 is a combination of these two programs.  As shipped the
  673.      defaults for 5.2 and above make it work similar to older versions of
  674.      GetKey.  The following is a list of incompatibilities and differences
  675.      that you need to watch for:
  676.  
  677.        -  Default number entry is now decimal instead of hexadecimal.  It
  678.           seems a lot of people consider decimal the most natural base to
  679.           use.  A strange way of thinking but I bow to the majority in this
  680.           case.  To adapt existing files just take out the & sign where you
  681.           have it and put it in where you don't (i.e. an existing #&10 should
  682.           be changed to #10 and an existing #10 should be changed to #&10).
  683.           If you don't care for that idea use /4 as one of your command line
  684.           arguments.  This changes the default back to hexadecimal.
  685.  
  686.        -  If you don't force responses to upper-case then lower-case letters
  687.           will return their lower-case value.  As shipped, GetKey defaults to
  688.           forced uppercase responses.
  689.  
  690.        -  The /W parameter now lets you enter the waiting period in seconds
  691.           rather than a code character that was, in some cases, obscure.
  692.  
  693.        -  The default environment variable (as shipped) is GK.  GetStrng
  694.           users take note.
  695.  
  696.        -  You can now display things in the bottom right corner of the screen
  697.           without having the screen scroll.
  698.  
  699.        -  To allow a SPACE(s) to be entered as a response you will have to
  700.           turn trimming (/T) off.  This only concerns responses consisting of
  701.           just spaces.  Embedded spaces are never removed.
  702.  
  703.        -  The following keys are now editing keys and will not return a
  704.           value: Home, End, Left Arrow, Right Arrow, Ins, Del, Esc, and
  705.           Backspace.  If bounce bars are being used add Up Arrow, Down Arrow,
  706.           and Spacebar to this list.
  707.  
  708.  
  709.  
  710.      BatKit   ver. 5.4                9/1/93                         Page: 15
  711.  
  712.  
  713.  
  714.  
  715.  
  716.      USING WAIT:
  717.  
  718.        USAGE:  WAIT [?] [/M] [/C] [/U] [/B] [time]
  719.  
  720.           where: ?  - displays help screen
  721.                  /M - turns off the waiting until message
  722.                  /C - turns ON the clock display
  723.                  /U - wait until the time given
  724.                  /B - makes delay non-interruptible
  725.                       (CTRL-BREAK is also disabled)
  726.                  time - 6 digits in HHMMSS format.  Can be entered in
  727.                         any way desired.
  728.                         Examples:  01:02:03   010203
  729.                                    01 hours 02 minutes 03 seconds
  730.  
  731.           Wait provides a way to cause a delay in the processing of a batch
  732.      file.  The delay can be from 1 second to 23 hours 59 minutes and 59
  733.      seconds.  It may be for an amount of time or until a given time.  It can
  734.      be interruptible or non-interruptible.  If it is interruptible, then
  735.      pressing any key will exit Wait.  If no time is entered Wait defaults to
  736.      approximately 1 second.  If an entry error is made, a message is
  737.      displayed, and an ERRORLEVEL of 1 is returned.
  738.  
  739.  
  740.  
  741.      BatKit   ver. 5.4                9/1/93                         Page: 16
  742.  
  743.  
  744.  
  745.  
  746.  
  747.      USING SAVEDIR:
  748.  
  749.        USAGE: SaveDir [?] [d:][dir] [/H] [/L] [/N]
  750.  
  751.           where d:  = a valid drive
  752.                 dir = a valid directory
  753.                 ?   = display help screens
  754.                 /H  = display help screens
  755.                 /L  = change to the drive and directory saved in LDIR
  756.                 /N  = don't save the current drive and directory in LDIR
  757.  
  758.           SaveDir places the current drive and directory path into the
  759.      environment using the variable names LDRV and LDIR.  Using the syntax
  760.      'SaveDir d:dir' will make SaveDir change to that drive & directory after
  761.      it has saved the info about the current directory.  After SaveDir is
  762.      run, the command CD %LDIR% can be used by a batch file to return to the
  763.      directory current when SaveDir was run, and %LDRV% can be used to change
  764.      to the drive that was current.  The following is an outline of a batch
  765.      file that will save the information about where it is currently, change
  766.      to a new drive and directory, execute some commands, and then return
  767.      where it started:
  768.  
  769.           SaveDir d:dir
  770.           .
  771.           . whatever commands you want
  772.           .
  773.           %LDRV%
  774.           CD %LDIR%
  775.  
  776.      Note that the last two lines could be replaced with 'SaveDir %LDIR%'.
  777.      Another advantage to using SaveDir is that you can change drive AND
  778.      directory with one command instead of the two that DOS requires.
  779.      Issuing consecutive 'SaveDir /L' commands will toggle you between two
  780.      directories.
  781.  
  782.           Error conditions will set ERRORLEVEL as follows:
  783.  
  784.           1 = not enough environment space to insert LDIR
  785.           2 = not enough environment space to insert LDRV
  786.           3 = the DOS being used is earlier than 2.0
  787.           4 = an invalid directory was entered
  788.           5 = an invalid drive was entered
  789.           6 = bad command line parameter entered
  790.           7 = LDIR was not found in the environment
  791.  
  792.  
  793.  
  794.      BatKit   ver. 5.4                9/1/93                         Page: 17
  795.  
  796.  
  797.  
  798.  
  799.  
  800.      USING GETSCRN:
  801.  
  802.        USAGE:  GETSCRN [U] [I] [x]
  803.  
  804.           where: U- unloads GetScrn from memory
  805.                  I- forces GetScrn to use a screen size of 80X25.  Use this
  806.                     option if GetScrn is not able to determine your screen
  807.                     size.
  808.                  x- any character or number other than U or I.  Sets the
  809.                     hotkey to Alt-x.  The active hotkey is displayed when
  810.                     GetScrn is started.
  811.  
  812.        GetScrn is a text screen capture utility.  When the hotkey is pressed
  813.      GetScrn captures a snapshot of the current screen and saves it to a
  814.      file.  The file name will be SCREENnn.TXT where nn is a number from 00
  815.      to 99.  GetScrn captures the text and display attributes of the screen.
  816.      The screen snapshots produced by GetScrn can be used by utilities such
  817.      as MakeScrn and PC Magazine's PAINT program.
  818.  
  819.  
  820.  
  821.      BatKit   ver. 5.4                9/1/93                         Page: 18
  822.  
  823.  
  824.  
  825.      USING THE DOS ENVIRONMENT:
  826.  
  827.        The environment is a section (or sections) of memory reserved by DOS.
  828.      Information that may change, such as the path, is stored in it.  The
  829.      information in the environment is stored in the form varname=text where
  830.      varname is the name of the environment variable and text is the
  831.      information associated with it.  In a batch file you can use varname to
  832.      access the information.  When a batch file encounters the syntax
  833.      %varname% it replaces it with the information associated with varname.
  834.      The principal and operation are the same as the %1 through %9 command
  835.      line arguments that batch files use.  If you want to see what you have
  836.      in your environment enter SET at the DOS prompt.  To add something to
  837.      the environment enter SET varname=text.
  838.  
  839.        One problem with using the environment is that it defaults to a small
  840.      size.  Once it is full nothing more can be added unless something else
  841.      is removed first.  If you are using DOS 3.x or later this is easily
  842.      overcome by adding a command to the CONFIG.SYS file.  For DOS 3.1 use
  843.      the command 'SHELL=C:\COMMAND.COM C:\ /E:paragraphs /P'.  For DOS 3.2
  844.      and later use 'SHELL=C:\COMMAND.COM C:\ /E:bytes /P'.  (Note: These are
  845.      general examples and may need to be adjusted for your system).  The
  846.      difference between the two is that DOS 3.1 wants the amount of memory to
  847.      be reserved to be specified in 16 byte paragraphs and the later versions
  848.      want it specified in bytes.  If you have COMMAND.COM located somewhere
  849.      other than the root directory of drive C: then replace C:\COMMAND.COM
  850.      and C:\ with the drive and path to where you do have it (example:
  851.      D:\DOS\COMMAND.COM and D:\DOS).  The /P is needed to make AUTOEXEC.BAT
  852.      execute if it is present.  If you are using a DOS version before 3.x it
  853.      is more difficult to expand the environment.  You will need to find one
  854.      of the programs that modifies COMMAND.COM.  You can probably find one on
  855.      the BBS where you found BatKit or on CompuServe in the IBMNEW or IBMSW
  856.      forums.
  857.  
  858.  
  859.      GETSCRN and MAKESCRN:
  860.  
  861.      If you want to capture screens from other programs for use with GetKey,
  862.      you can use these utilities.  GetScrn will capture any text screen to a
  863.      file in the PC Magazine PAINT format.  This file can then be edited with
  864.      PAINT and converted to a GetKey screen file by MakeScrn.  Although the
  865.      GetKey screen file can be created or edited by any text editor, it is
  866.      easier to create or edit screens with boxes, etc. using PAINT, which can
  867.      be downloaded from PC Magazine's Tips/Utilities Forum (GO ZNT:TIPS) on
  868.      ZiffNet.  A sample of screens captured with GetScrn and converted with
  869.      MakeScrn is included in BATDEMO.  GetScrn and MakeScrn are now included
  870.      with BatKit.  GetScrn is a TSR.  Instructions are displayed when it is
  871.      run.  Instructions for MakeScrn are displayed when it is run with one
  872.      exception.  MakeScrn will generate the code for several of the @ display
  873.      functions.  To do this place a @ in the file to be converted at the spot
  874.      you wish to have one of the @ functions.  When MakeScrn converts the
  875.      file it will stop at each @ in the file and prompt you for which
  876.      function you want.  Note that MakeScrn does not support all of the @
  877.      functions.
  878.  
  879.  
  880.  
  881.      BatKit   ver. 5.4                9/1/93                         Page: 19
  882.  
  883.      REGISTERING BatKit:
  884.  
  885.         You may copy and distribute this program freely, as long as all parts
  886.      of the package are included without modification.  BatKit is a shareware
  887.      product.  If you find it useful after trying it please register it.
  888.      Registered owners are entitled to receive support and notification of
  889.      updates.  To register BatKit please send $15 to:
  890.  
  891.           Ken Hipple
  892.           311 Summer Oak Trail
  893.           Madison, MS  39110
  894.  
  895.         Individuals who are CompuServe members may register on-line.  Go to
  896.      the Shareware Registration area (CIS:SWREG) and follow the instructions.
  897.      The SWREG ID # for BatKit is 1312.
  898.  
  899.      Site License:
  900.  
  901.        Site licenses are available for GetKey at the following prices.
  902.      GetKey site licenses cover use of the other BatKit utilities.
  903.  
  904.           10 license pack     $ 95
  905.           25 license pack      200
  906.           50 license pack      300
  907.           Unlimited usage      500
  908.  
  909.         BatKit is distributed without warranty, implied or otherwise.  If you
  910.      have any problems with BatKit or if you have any comments or suggestions
  911.      please send them to the above address or to me on ZiffNet or CompuServe
  912.      (ID# 72241,65 or 74076,2331).
  913.  
  914.         If you distribute BatKit you must include the following files as part
  915.      of the package:
  916.  
  917.        GETKEY.EXE        The GetKey program
  918.        SAVEDIR.COM       The SaveDir program
  919.        WAIT.COM          The Wait program
  920.        GETSCRN.COM       The GetScrn program
  921.        MAKESCRN.EXE      The MakeScrn program
  922.        BATKIT.DOC        The BatKit documentation file
  923.        DEMO.GKF          A text file that demonstrates GetKey's features.
  924.                          Used by BATDEMO.BAT or type: GETKEY /f"DEMO.GKF".
  925.        COLOTONE.GKF      A text file that displays all possible tone and
  926.                          color/attribute combinations.
  927.        COLOTONE.BAT      A batch file that uses COLOTONE.GKF
  928.        COLORS            A text file that displays all colors
  929.                          (use GetKey /F"Colors")
  930.        MSDEMO.GKF        A text file used by BATDEMO.BAT to illustrate screen
  931.                          captures by GetScrn and MakeScrn.
  932.        MENU.GKF          A text file containing menus for BATDEMO.BAT
  933.        GETKEY.RSP        A text file containing valid responses for
  934.                          BATDEMO.BAT.
  935.        BATDEMO.BAT       A batch file illustrating uses of GetKey, Wait, and
  936.                          SaveDir.
  937.        ASMENU.GKF        A sample menu screen text file
  938.  
  939.  
  940.  
  941.      BatKit   ver. 5.4                9/1/93                         Page: 20
  942.  
  943.  
  944.        README.1ST        Getting started and last minute info
  945.        VENDOR.TXT        Information for vendors
  946.        REGISTER.TXT      Registration information
  947.  
  948.      If you receive BatKit and any of these files are missing, please contact
  949.      the author at the above address or by email.
  950.  
  951.  
  952.      Many thanks go to Conrad Smith for his help in testing, his suggestions,
  953.      and his help in creating the demo/distribution package.
  954.  
  955.  
  956.                                DISTRIBUTION NOTICE
  957.  
  958.      VENDORS:  ASP approved vendors are allowed to distribute BatKit.  Other
  959.                vendors should contact the author at the above address before
  960.                beginning to distribute BatKit.
  961.  
  962.      BBS operators: BatKit may be uploaded and distributed by any BBS that
  963.                     does not charge a fee for a download.  Connect time
  964.                     charges and monthly/yearly flat-rate charges are
  965.                     acceptable.
  966.  
  967.           (The above references to BatKit cover the complete BatKit package
  968.           and the individual files found in the BatKit package.)
  969.  
  970.  
  971.  
  972.      BatKit   ver. 5.4                9/1/93                         Page: 21
  973.  
  974.  
  975.                             CHANGES SINCE RELEASE 5.0
  976.  
  977.      Version   Change
  978.       5.1a     Added screen blanking
  979.                Changed the /W command line parameter so that wait is forced
  980.                  on rather than being toggled
  981.                Increased accuracy of /W
  982.  
  983.       5.1b     Added screen blanking to help and options screens
  984.  
  985.       5.1c     Changed file read procedure so that there is no limit to the
  986.                  file size and contents
  987.  
  988.       5.1d     Corrected options setting not working after 5.1c change
  989.                Fixed options setting toggling snow checking on CGA machines
  990.                Improved snow checking
  991.                Fixed bad parameter problem when /KF used
  992.                Fixed problem of numeric arguments being converted wrong if
  993.                  they happened to be split between 2 file reads
  994.  
  995.       5.1e     Section labels inside a file were case sensitive.  Corrected.
  996.                BREAK checking changed so it is either off or on.  Before it
  997.                  was off only during actual display activity
  998.                Changed highlight color on options screen
  999.  
  1000.       5.1g     Fixed display problem when snow-checking on
  1001.  
  1002.       5.1h     Fixed problem with echo_char routine
  1003.                Fixed cosmetic problems on options setting screen
  1004.                Fixed 'hanging' problem during screen blanking on monochrome
  1005.                Fixed 'packed file corrupt' error after options setting
  1006.  
  1007.       5.1i     Fixed 'hanging' problem when @W came after an @P
  1008.  
  1009.       5.1j     fixed /I not working
  1010.  
  1011.       5.1k     Added /Y"program" so /V could be used with programs like
  1012.                  TREE86 & /YM so /V would affect the root environment
  1013.                Fixed parsing problem with /BL argument
  1014.                Added @Fnnn control code to 'flash' screen
  1015.  
  1016.       5.1l     added default values to @F (1), @S (1), and @W (18).
  1017.                @CR followed by @M caused disappearing cursor - fixed
  1018.  
  1019.       5.2      Added the following display options: @B, @BZ, @JC, @JH, @JI,
  1020.                @JK, @JO, @JP, @JW, @TF, @TR, @/, and @V
  1021.                Tones are now played in the background.
  1022.                Fixed 'section not found' problem with large files.
  1023.  
  1024.       5.2a     Added GETKEY env. variable for option setting.
  1025.                Fixed GetKey so it would stop thinking that a totally empty
  1026.                environment was actually full.
  1027.                Fixed problem of @/ not always parsing commands correctly and
  1028.                added @/ to the help screens.
  1029.  
  1030.  
  1031.  
  1032.      BatKit   ver. 5.4                9/1/93                         Page: 22
  1033.  
  1034.  
  1035.                When using /O the screen blank time and response length values
  1036.                on the help screen were being set to the wrong value when a
  1037.                value larger than the max allowed was entered.  Fixed.
  1038.  
  1039.       5.2b     Fixed section labels not being found
  1040.                Fixed problem with @T0
  1041.  
  1042.       5.2c     Snow-checking & bounce-bars together would sometimes cause a
  1043.                crash
  1044.                Added @JH to help screen
  1045.                @/ caused problems with /k - corrected
  1046.                Changed @M to accept values above 7.
  1047.  
  1048.       5.2d     Forced echo on in options setting screen
  1049.  
  1050.       5.2e     Removed non-existent @JC command from help screen
  1051.  
  1052.       5.3      Added @DD-, @DD+, @DT-, and @DT+ to allow date and time
  1053.                displays to be turned on and off
  1054.                Added @MR to allow a left margin to be set
  1055.  
  1056.       5.4      Added 'allow piping' feature (/PI)
  1057.                Fixed problem when using /g with /l0
  1058.                Fixed 'find master environment' feature
  1059.                Fixed @S parsing problem
  1060.                @V had never been implemented
  1061.