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