home *** CD-ROM | disk | FTP | other *** search
/ Current Shareware 1994 January / SHAR194.ISO / textutil / read307.zip / READ.DOC < prev    next >
Text File  |  1993-07-15  |  11KB  |  267 lines

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