home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / progbas / ascsu205.arj / GETKEY.DOC < prev    next >
Encoding:
Text File  |  1991-11-17  |  5.9 KB  |  130 lines

  1.                               NOTES ON GETKEY.COM
  2.  
  3.                                  Version 1.01
  4.  
  5.                                  Matt Roberts
  6.                                3 Cedar St., # 8
  7.                            Montpelier, Vt 05602-3006
  8.  
  9.                                    07-14-91
  10.  
  11. ───────────────────────────────────────────────────────────────────────────────
  12. GETKEY.COM is, essentially, a marriage of two of Bob Wallace's assembly 
  13. language utilities, GETA9.COM and GETYN.COM, and my own GETPAUSE.COM.
  14.  
  15. GETKEY is a batch file utility which allows you to display a message on the 
  16. screen, wait for a key to be pressed, and take action based on that keypress.
  17.  
  18. You can invoke GETKEY in one of several ways, although two of them just offer 
  19. or give help.
  20.  
  21.                                 GETKEY OPTIONS
  22.  
  23.  
  24. 1- GETKEY typed by itself will produce the following message:
  25.  
  26. Do you need help? (y/n)
  27.  
  28. Typing Y (or y) will get you the help screen, with a summary of GETKEY's 
  29. options.  A negative response will get a message that GETKEY cannot be used 
  30. without including a message (see more about that below) and informs you that 
  31. it's designed to be used in batch files.  Only y or n are acceptable as 
  32. responses.  Upper or lower case is fine.
  33.  
  34.  
  35. 2- Typing GETKEY /? produces a help screen and returns you to DOS.
  36.  
  37.  
  38. 3- Typing GETKEY /e Message will print the message, and wait for a key to be 
  39. pressed.  Whatever key you press will be printed to the screen (except Esc and 
  40. the function keys), and an errorlevel will be generated based on that key.  
  41. The following keys are accepted: a-z (upper or lower case), 0-9, the Esc key, 
  42. and function keys F1-F10.   A-Z or a-z return errorlevels 1-26; 0-9 return 
  43. errorlevels 27-36; and the Esc key returns errorlevel 0.  Function keys F1-F10 
  44. return errorlevels 37-46.  Originally, this option did not use any parameter 
  45. but, due to the way ASIC works, this introduced a minor problem with screen 
  46. writes in 40-column mode.  The addition of the /e parameter solved that 
  47. problem.
  48.  
  49.  
  50. 4- Typing GETKEY /m Message works just like the internal DOS command PAUSE, 
  51. but allows you to customize your message.  For instance, typing
  52.  
  53. GETKEY /m Press any key to see the menu of files.
  54.  
  55. will print the message Press any key etc., and pause.  Execution of the batch 
  56. file will continue with the next command with any keypress, just like the 
  57. PAUSE command.  The key typed is not printed on the screen.
  58.  
  59.  
  60. 5- GETKEY /q Yes or no question will print the question, pause, and wait for a 
  61. 2
  62. y or n response.  If you decide for some reason that you don't want to press 
  63. either, your batch file can include an Esc option to get out of the whole 
  64. mess.  An errorlevel of 2 is set for y or Y; an errorlevel of 1 is generated 
  65. for n or N; and an errorlevel of 0 is generated for the Esc key. 
  66.  
  67. In all examples preceding, you can use either upper or lower case; it makes no 
  68. difference to GETKEY, as long as you get the spelling right.
  69.  
  70.  
  71. This utility came out of my desire to combine the Bob Wallace utilities 
  72. mentioned at the beginning of this file, to add the pause feature, and to 
  73. include the function keys.  A utility which just generates a customized PAUSE 
  74. message, GETPAUSE.COM, was also written by me.  However, I prefer not to have 
  75. any more utilities on a disk than necessary.  This one does the work of three 
  76. utilities, which makes for a somewhat neater appearance. 
  77.  
  78. There are, however, drawbacks.  The first is speed.  Bob Wallace's utilities 
  79. are written in assembly language.  Mine is written in ASIC, a BASIC compiler.  
  80. Since ASIC doesn't write code that is as tight as assembly language, action is 
  81. slowed down.  In addition, DOS's PAUSE command is internal, which means it's 
  82. faster than any external utility you could write. 
  83.  
  84. If you must have the highest speed possible, you may want to use Bob Wallace's 
  85. utilities, which are available from Quicksoft on their PD/S 1 utilities disk.  
  86. Their address is listed below.  You can also use the ECHO command with PAUSE > 
  87. NUL, to produce a customized PAUSE messages.  The cursor, however, will go to 
  88. the beginning of the next line, which bothered me.  Sue me for being picky.  
  89. Here's the usage: 
  90.  
  91. ECHO message
  92. PAUSE > NUL
  93.  
  94.  
  95. ───────────────────────────────────────────────────────────────────────────────
  96. Bob Wallace's two utilities can be obtained on Quicksoft's PD/S 1 diskette.  
  97. Quicksoft can be reached at 219 First Ave N # 224, Seattle, Wa 98109.
  98.  
  99. ASIC is an excellent compiler by David Visti.  Registration is only 
  100. $10.00 currently; I suggest you get you a registered copy before he comes to 
  101. his senses and starts charging what it's worth.  He can be reached at P.O. Box 
  102. 2952, Raleigh, NC 27602-2952.
  103.  
  104.  
  105.                                      TESTS
  106.  
  107. Version numbers exist for the purpose of testing this disk's utilities on 
  108. other computers.  Version 1.00 has been tested on the following:
  109.  
  110. Amstrad PC1512 SD: This system has an 8086 CPU, a composite monochrome 
  111. monitor, and CGA which can access 16 shades of gray (or color with a color 
  112. monitor) with a resolution of up to 640 X 200.  The system originally came 
  113. with 512K RAM, which I've upgraded to 640K.  It came with a single 5.25", 360K 
  114. drive.  A second internal drive of the same type was later added, and I've 
  115. installed a 49Mb hard disk card.  Operating system is MS-DOS 3.20.  This line 
  116. has been discontinued.  This utility had no problems running on the Amstrad. 
  117.  
  118.  
  119. Packard Bell Pack-Mate: This system has an 80286 CPU and a color VGA monitor.  
  120. Drives are one 40Mb internal hard disk, one 5.25", 1.2Mb drive, and one 3.5", 
  121. 1.44 Mb drive.  Operating system is MS-DOS 3.30.  This utility had no problems 
  122. 3
  123. running on the Packard Bell.
  124.  
  125. Version 1.01 has been tested thus far only on the Amstrad, where it seems to 
  126. work fine.
  127.  
  128. If you have any problems using GETKEY, drop me a line.  I'm also available for 
  129. any comments, questions, or criticisms you may have.
  130.