home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR4 / READ310.ZIP / READ.DOC < prev    next >
Text File  |  1993-09-25  |  11KB  |  271 lines

  1. READ.DOC
  2. 09/25/93
  3.  
  4. Program written by:
  5.                         Bruce Guthrie
  6.                         Room H-4885
  7.                         U.S. Dept of Commerce/ESA/OBA/BSISD
  8.                         Washington, D.C. 20230
  9.  
  10.                         (202) 482-3234
  11.  
  12. You may freely copy and re-distribute this program; however, the U.S.
  13. Department of Commerce neither guarantees nor assures compatibility of the
  14. program with all computer software or hardware.
  15.  
  16. Foreign users:  Please provide an Internet address in all correspondence or
  17. and just e-mail your problems to me at bgu@cu.nih.gov
  18.  
  19.  
  20. READ allows you to view any ASCII text document with 16,000 lines or less (about
  21. 900,000 bytes).  You can also search for text within a document, scroll around
  22. in the document, and split up big files into small files for printing or copying
  23. to another file.
  24.  
  25. READ supports a mouse scroll bar at the top if a compatible mouse is detected.
  26.  
  27.  
  28. Syntax:
  29.  
  30.     READ [ filespec | @filename ] [ /line ] [ /Pport ] [ /-I ]
  31.       [ /DOS | /-DOS ] [ /MONO | /-MONO | /COLOR | /-COLOR ] [ /? ]
  32.  
  33. where:
  34.  
  35. "filespec" is the file specification you want to view.  You can use a path
  36. specification and a single wildcard if you'd like.  It defaults to three
  37. wildcard selections; *.DOC, *.TXT, and *.BAT.  If more than one document in the
  38. directory matches the wildcard, you can switch back and forth between documents
  39. with Ctrl-PgUp and Ctrl-PgDn.
  40.  
  41. "@filename" is a text file that contains the names of any files you want READ
  42. to process.  The file can contain only filenames, with paths if desired, one
  43. file per line.
  44.  
  45. "/line" puts line "line" at the top of the screen.  Only applicable if
  46. "filespec" (vs "@filename") is used.
  47.  
  48. "/Pport" specifies the printer port to use for printing.  This typically
  49. defaults to /PLPT1:  although this can be overridden by the READ.INI file.  (See
  50. below.) If a READ.INI file is found, any /Pport, /MONO, /COLOR, /-MONO, or
  51. /-COLOR specification is ignored.
  52.  
  53. "/-I" says to ignore any READ.INI file found.
  54.  
  55.  
  56. "/DOS" allows access to the jump to DOS feature of the program.  This is
  57. typically the default.
  58.  
  59. "/-DOS" prohibits jumping to DOS.
  60.  
  61. "/MONO" or "/-COLOR" forces the system into monochrome mode.
  62.  
  63. "/-MONO" or "/COLOR" forces the system into color mode.  This is typically the
  64. default.
  65.  
  66. "/?" or "/HELP" or "HELP" gives you syntactical help on how to use the command.
  67.  
  68.  
  69. Return codes:
  70.  
  71. READ returns an ERRORLEVEL parameter of 2 if the file can't be found, and 1 if
  72. an invalid parameter was passed in.
  73.  
  74.  
  75. Viewing options:
  76.  
  77. While you're viewing a document with the READ command, you can use the following
  78. keys:
  79.  
  80. Cursor movement keys (up/down):
  81.  
  82. Up                moves up one line
  83. Down              moves down one line
  84. Home              moves to the top line of the document
  85. End               moves to the bottom line of the document
  86. PgUp              moves up one screen's worth
  87. PgDn              moves down one screen's worth
  88. #line or Gline    moves to the given line in the document (goto line)
  89. +line             moves forward a number of lines
  90. -line             moves backward a number of lines
  91.  
  92. Cursor movement keys (right/left):
  93.  
  94. Right             moves one column to the right
  95. Left              moves one column to the left
  96. Tab               moves 8 columns to the right
  97. Shift-Tab         moves 8 columns to the left
  98. Ctrl-Right        moves to the far right of the document
  99. Ctrl-Left         moves to the far left of the document
  100.  
  101.  
  102. Search for text:
  103.  
  104. \ or F or f       search for text within the document
  105.                   (the search is case-insensitive; "/COMMERCE" will find
  106.                   "Commerce", "commerce", and "COMMERCE")
  107. /                 search for exact (case-sensitive) text within the document
  108. F3                search for the next occurrence of that text
  109. F9                search for the previous occurrence of that text
  110.  
  111. Marking lines:
  112.  
  113. Alt-M             mark top line for copy or print
  114. Alt-B             mark bottom line for copy or print
  115. Alt-U             unmark all lines
  116.  
  117. Copying/printing lines (can copy/print either marked lines, all lines, or just
  118. the lines that are currently on the screen):
  119.  
  120. Alt-C or Alt-D    copy (duplicate) lines to a file
  121. Alt-P             print lines
  122.  
  123. Next/previous documents:
  124.  
  125. Ctrl-PgUp         go to the previous file viewed
  126. Ctrl-PgDn         go to the next file specified on the input line
  127.  
  128. Miscellaneous:
  129.  
  130. Alt-E             toggles between 25-line and 43-/50-line mode (if your system
  131.                   supports EGA and VGA respectively)
  132. Alt-J or Alt-G    jumps (goes) to DOS; say EXIT to get back to program;
  133.                   this feature can be turned off using the /-DOS switch
  134. Alt-R             shows ruler at the top of the listing
  135. Ctrl-P or Ctrl-F  do a form feed to the printer
  136. F1                get help screen (which also includes some other statistical
  137.                   information like the size of the file in bytes)
  138. Esc               leave READ program
  139.  
  140. Note that you can't view beyond the beginning or end of the document.  This is
  141. obvious but you cannot scroll to the right if you're already seeing the far
  142. right of the display.
  143.  
  144.  
  145.  
  146. Marking and copying text:
  147.  
  148. If you need to copy a portion of your file to the printer or to another text
  149. file, you will typically want to mark sections of the text first.  This is done
  150. using the mark functions:  Alt-M marks the top line on the screen and Alt-B
  151. marks the bottom line on the screen.
  152.  
  153. For example, you might decide that you have a 2,000-line document and you want
  154. to print 50 lines of it.  Go to the first line you want to print or copy (you
  155. can use the search options if you want to).  Get that line at either the top of
  156. the screen or the bottom of the screen.  If it's the bottom line, press Alt-B;
  157. if it's the top line, press Alt-M.
  158.  
  159. Now go to the last line you want to print or copy.  Again, get that line at
  160. either the top of the screen or the bottom of the screen and press Alt-B or
  161. Alt-M appropriately.  Having marked two lines, the program tags those lines and
  162. all those lines between them.  You can use the F1 (help) key; it will tell you
  163. the first and last lines that are marked.
  164.  
  165. Now press Alt-C (or Alt-D) to Copy the lines elsewhere or Alt-P to print them.
  166. When you select these functions, you'll be asked if you want to process the
  167. whole file, just those lines on the current screen, or the lines that are
  168. marked.  Ask for the marked lines.  If you selected Alt-C, you'll be asked for
  169. the file name to copy the lines to.  If the file already exists, you'll be
  170. allowed to overwrite the existing file or append to it.
  171.  
  172. Note that you can say "LPT1:" or "PRN:" when you're doing Alt-C in which case
  173. the text will go to the printer.  The differences between Alt-C and Alt-P are:
  174.  
  175. (1) Alt-P will remove linefeeds during printing whereas Alt-C leaves them in.
  176.     Typically, Alt-C will result in double-spaced printing.
  177.  
  178. (2) Alt-P may reset the printer based on the width of the current document if a
  179.     READ.INI file is used.
  180.  
  181.  
  182. The READ.INI file:
  183.  
  184. The READ program utilizes a READ.INI file if one is found.  This file is an
  185. ASCII text file that can be created maintained by hand or else by Wayne
  186. Software's READINIT.EXE program (which is also free).  The file itself consists
  187. of one or more of the following types of statements:
  188.  
  189.         comments
  190.         PORT=port
  191.         PTYPE=name
  192.         INITT=string
  193.         INITW=string
  194.         AFTERP=string
  195.         AFTERF=string
  196.         COLOR=nnn nnn nnn nnn
  197.  
  198. comments are blank lines or any line beginning with:
  199.                         ;    (semi-colon)
  200.                         :    (colon)
  201.                         '    (quote)
  202.                         /*   (slash asterisk)
  203.  
  204. PORT=port provides the name of printer port such as LPT1:  or COM2:, you can
  205. specify a file name here if desired.  Defaults to "PORT=LPT1:".
  206.  
  207. PTYPE=name is the abbreviated name of printer brand such as "HPLJ" or "EPSON".
  208. This statement is purely informational to READ although it used by the
  209. READINIT.EXE program.
  210.  
  211. INITT=string ("initialize thin") provides the string that will be sent to the
  212. printer before printing if all lines in the document are 80 characters or less
  213. in length.  The string can include regular characters.  Special characters are
  214. entered by using their three-character ASCII numeric code preceded by a slash.
  215. "/027" is the code for the special character Escape.  You can specify
  216. INITT=(NONE) if desired.  Defaults to "INITT=(NONE)".
  217.  
  218. INITW=string ("initialize wide") provides the string that will be sent to the
  219. printer before printing if any lines in the document (not just the section
  220. printed) exceed 80 characters in length.  See INITT=string description.
  221. Defaults to "INITW=(NONE)".
  222.  
  223. For a Hewlett-Packard LaserJet, the following codes would typically be used:
  224.         INITT=/027E             (portrait mode, 80 column)
  225.         INITW=/027E/027(s16.66H (portrait mode, 132 column)
  226.  
  227. AFTERP=string specifies the string to print after a partial document is printed.
  228. This string can include a page eject character ("/012") or any printer reset
  229. codes ("/012/027E") you want.  Defaults to "AFTERP=(NONE)".
  230.  
  231. AFTERF=string specifies the string to print after a full document is printed.
  232. See AFTERP=string description.  Defaults to "AFTERF=(NONE)".
  233.  
  234.  
  235. COLOR=nnn nnn nnn nnn specifies the color settings to use for (in order) regular
  236. text, the status line, marked text, and found text.  Each setting must consist
  237. of three digits, the first two being the foreground color and the last being the
  238. background color.  The foreground color should be padded on the left with a 0 if
  239. it is only one digit in length.  Defaults to "COLOR=150 151 157 143".
  240.  
  241. Foreground colors:
  242.  
  243.         Low intensity           High intensity
  244.  
  245.         0 = black                8 = dark grey
  246.         1 = blue                 9 = light blue
  247.         2 = green               10 = light green
  248.         3 = cyan                11 = light cyan
  249.         4 = red                 12 = light red
  250.         5 = magenta             13 = light magenta
  251.         6 = brown               14 = light yellow
  252.         7 = white               15 = bright white
  253.  
  254. Adding 16 to any color will make the text blink.  Background colors can consist
  255. of 0 to 7 above.  Bright white on blue, for example, would be "151".
  256.  
  257. The READ.INI file can skip any of the above statements in which case system
  258. defaults will be taken.
  259.  
  260. READ and READMAKE-created files look for READ.INI in the following locations in
  261. the following order:
  262.  
  263.         C:\
  264.         your default subdirectory
  265.         the directory where READ.EXE or the self-viewable file was found
  266.  
  267. Passing in "/-I" causes the READ.INI file to be ignored.  Note that a READ.INI
  268. file with PORT and COLOR settings causes any passed in "/MONO", "/COLOR",
  269. "/-MONO", "/-COLOR", or "/Pport" parameters to be ignored.
  270.  
  271.