home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / util2 / masdir43.lzh / GET.DOC < prev    next >
Text File  |  1989-06-18  |  8KB  |  116 lines

  1.     GET -- Bob Stephan's Batch file enhancer -- a public domain utility
  2.            Syntax:  GET command argument
  3.   Purpose             Command       Argument   Environment Errorlevel  Extended
  4.   ---------           -------       --------   --(GET=)--- --(Exit)--  --[E]---
  5.   Get character       C[E] ["prompt"] [chars]  Character   ASCII dec.  No Echo
  6.   Get yes/no aNswer   N[E] ["prompt"]  None    Character   ASCII dec.  No Echo
  7.   Get string          S[E] ["prompt"]  None    String      Length      No Echo
  8.   Moving Text(GetaKey)T[E] "Filespec" [chars]  Character   ASCII dec.  No Echo
  9.   Get DOS version     D[E]             None    Major Vers. MajorMinor  MinorEnv
  10.   Get environment left    E[E]         None    Bytes left  Bytes left  Bytes/10
  11.   Get file size (DIR=0)   F[E]  Filespec       Hex bytes   Kilobytes   Kb/10
  12.   Get disk space          K[E] [driveletter]   Kilobytes   Kilobytes   Kb/10
  13.   Get memory free         M[E]         None    Kilobytes   Kilobytes   Kb/10
  14.   Clear (Blank) Screen    B[E] [New attribute] Current or last attr.   HexAttr
  15.   Check for printer       P            None    1=yes,0=no  1=yes,0=no  None
  16.   Get/set video mode      V   [New mode]       Current or last mode    None
  17.   Check coprocessor       7            None    1=yes,0=no  1=yes,0=no  None
  18.   Check for ANSI.SYS      A            None    1=yes,0=no  1=yes,0=no  None
  19.   Get current directory   Y[E]         None    Directory   Level/Drive Drive
  20.   Surrogate [char] args: } is Carriage Return, ~ is Escape, ` is Extended.
  21.  
  22.   Explanations:
  23.   To display the above screen, enter GET with no arguments, or GET ?.
  24.   Commands are single characters or a character and [optionally] E with
  25.      no spaces between.  The E indicates the Extended function above.
  26.   N, the yes/no aNswer will accept y, n, carriage return, or Esc.
  27.   B, the screen Blanker, does not change your color settings unless
  28.      you give it an attribute to use, and it will work with any number
  29.      of lines on the screen (e.g. EGA 43 or VGA 50).  If an attribute
  30.      argument is given it is taken to be a 1, 2, or 3-digit decimal number
  31.      that is converted to a two-digit hexadecimal number for the attribute.
  32.      The extended function BE regards an argument as a 1 or 2-digit hex
  33.      number, and the GET value in the environment is in hex.
  34.      A table of screen attributes will be useful.
  35.   [] brackets indicate optional portions of commands and/or arguments. The
  36.      command will work regardless whether these portions are included or not.
  37.      The brackets themselves must not be included!
  38.   "  Where double quotes ("'s) are shown, they must be included if the
  39.      corresponding command or argument is used.
  40.   Filespec's may include drive and path but no wild cards.
  41.   [chars] are optional characters that limit the user input to just
  42.      the characters given.  This should be a contiguous character
  43.      string separated from the prompt, if given, by a space.
  44.      Single keystrokes for C, N or T are acted on without pressing Enter.
  45.      (String input, of course, will require the user to press Enter.)
  46.      The comparison of characters is not case sensitive.  To
  47.      indicate that a carriage return, Esc, or Extended key is
  48.      acceptable, include the surrogate character listed above.  CR and
  49.      Esc will return 125 and 126 in the errorlevel respectively.  If
  50.      no chars are given, any key stroke will be accepted.  If extended
  51.      keyboard characters are specified, the scan code will be in the
  52.      errorlevel and the corresponding ASCII byte in the environment
  53.      preceeded by "`".  A table of keyboard scan codes will be useful.
  54.   Environment: this column indicates what will be found in the
  55.      environment string GET=.  This string can be accessed from a
  56.      BATch file with the %GET% notation.
  57.   Errorlevel: this column indicates what value will be placed in the
  58.      DOS errorlevel that can be accessed in BATch files with the
  59.      "if errorlevel" subcommand.
  60.   Extended: this column indicates the action taken if the optional
  61.      [E]xtended command is included.  Do not include the brackets!
  62.      For example, to get the drive use GET YE.  The values/10 refer to
  63.      errorlevel return codes reduced by a factor of 10, useful for large
  64.      values.  The drive for the Y command will be in both places using
  65.      0 for A:, 1 for B:, etc. in the errorlevel.  For the D command,
  66.      the minor DOS version (e.g., the 1 in 3.1) will be in the environment,
  67.      but the errorlevel will have (major*10)+minor in either case (e.g. 31).
  68.   T, the Moving Text feature, requires a file with the prompt string that
  69.      will be displayed moving across the bottom line of the screen.
  70.      Currently only standard 25 line screens are supported.  The text
  71.      file should be plain ASCII without any control characters (No CR,
  72.      LF, or any other characters below ASCII 32).  To be effective
  73.      the prompt must be over 80 characters long, and to ensure
  74.      smooth wrap-around the first 79 characters should be repeated
  75.      at the end.  The maximum length for the text of the moving
  76.      prompt is 4096 characters.  Over that it will be truncated.
  77.   V: don't fool around with Video mode unless you know what you're doing!
  78.  
  79.   GET is programmmed in assembly language for MS-DOS computers.  If you need
  80.   more BATch programming capability than is included here, I suggest you look
  81.   into the Shareware product, Extended Batch Language (EBL).  However, you
  82.   will probably have to pay a licensing fee for EBL, and GET is FREE!
  83.   Much of the code for GET was adapted from the sample program named
  84.   WHAT.ASM included with Microsoft Macro Assembler (MASM).  The MASM
  85.   documentation declares that the sample programs are in the public domain.
  86.   For examples of GET, look at the BATch files on the MASDIR disk for
  87.   the use of a similar program called SDL_GET.  You can do a lot in
  88.   BATch programming with this utility.  It remains in the public domain
  89.   for all to enjoy.                     /s/Bob Stephan    June 18, 1989
  90.  
  91.    If you have any questions, comments, or suggestions please contact me at:
  92.         MOBY DISK: 1021 San Carlos Road, Pebble Beach, CA 93953
  93.    Phone: (408) 646-1899, 646-1373.  GENIE:MOBYDISK.  COMPUSERVE:72357,2276
  94.  
  95.      Now for the commercial: If you like GET you will love MASDIR!
  96.   MASDIR (pronounced 'master') the MASter DIRectory System, is a general
  97.   purpose sorted directory program with unique disk label printing and
  98.   customization features. If you ever use DIR, you should do yourself a
  99.   favor and take a look at MASDIR. The main program, SDL.COM, is one of the
  100.   best sorted directory programs anywhere. The setup program allows you to
  101.   set the many defaults to your own specifications, including customizing
  102.   the titles that appear in the header. In addition, you can print disk
  103.   labels and or sleeve inserts for 5.25" and 3.5" diskettes. This really
  104.   saves you a lot of time when you are looking through your collection of
  105.   diskettes for a particular file. They are all listed conveniently along
  106.   with your own description in the title lines. You can also create disk
  107.   file catalogs of your diskettes and directories that you can then
  108.   annotate to describe individual files.
  109.  
  110.   As of the above date, the current release of MASDIR is Version 4.3. It is
  111.   a shareware program that is available on bulletin boards, GENIE,
  112.   CompuServe, The Public (software) Library, and from other distributors of
  113.   public domain and shareware programs. If you cannot conveniently locate a
  114.   copy, I will be happy to send you one. Just contact me as indicated
  115.   above. Thank you for your kind attention. /Bob/
  116.