home *** CD-ROM | disk | FTP | other *** search
/ Share Gallery 1 / share_gal_1.zip / share_gal_1 / LA / LA021.ZIP / MACROS.DOC < prev    next >
Text File  |  1990-02-27  |  11KB  |  301 lines

  1.  
  2.  
  3.  
  4.           QMacros  --  Miscellaneous Macro Files for QEdit
  5.  
  6.          A collection of keyboard macro files for use with
  7.                QEdit, the Quick Editor, by SemWare.
  8.  
  9.                          Release: 2.10
  10.                     Date:  February 27th, 1990
  11.  
  12.      QEdit and QMac are Copyright (C) 1985-1990 by SemWare.
  13.               All Rights Reserved.
  14.  
  15.  
  16. DESCRIPTION
  17. -----------
  18. QEdit has a very useful macro language built in.  However, many
  19. users are not aware of its capabilities and therefore do not take
  20. advantage of it.
  21.  
  22. Included with this file are various macros that have been created
  23. for use with QEdit for DOS v2.1, QEdit for OS/2 v1.5, and QEdit
  24. TSR v1.1.  Each provides some useful capability or automates some
  25. task not already built-in to QEdit.
  26.  
  27. All are useful in and of themselves, but they are most useful as
  28. examples of what is possible with QEdit's macro language.  By
  29. examining these macros, you can discover some of the things that
  30. are possible, and use this knowledge to create better macros for
  31. your own use.
  32.  
  33. In particular, see the CHANGE.QM and SCRATCHS.QM for examples of
  34. the use of the new Jump, JTrue and JFalse commands that are new
  35. to the latest versions of QEdit.  These allow you to creat macros
  36. that loop, or that modify their behavior based on what happens.
  37.  
  38. You will need a copy of QMac, version 2.1 or higher, for use with
  39. these macros.  This should be included with this file, look for
  40. QMAC.EXE and QMAC.DOC.
  41.  
  42.  
  43.  
  44. CONTENTS
  45. --------
  46. The following macro files are provided:
  47.  
  48.      MACROS.DOC     this file
  49.      MACROS.QM      a collection of miscellaneous short macros
  50.      BIGFIND.QM     an external find/grep macro
  51.      CHANGE.QM      an automated search/replace on up to 100 files
  52.      QASCII.QM      an ASCII chart macro
  53.      QASCII.LST     the ASCII chart itself
  54.      SCRATCHS.QM    a macro to automatically load scratch buffers
  55.      SCRATCHS.LST   a sample scratch buffer data file
  56.  
  57.  
  58.  
  59. INSTRUCTIONS
  60. ------------
  61. For most of these files, you will need to use the QMac utility to
  62. convert them to a "binary" macro file before you can use them
  63. with QEdit.  You should read QMAC.DOC for details, but here are
  64. some quick instructions.  For example, to make use of the Ascii
  65. Chart macro, you need to convert QASCII.QM to a loadable macro
  66. file.
  67.  
  68. Issue the following command at the DOS prompt:
  69.  
  70.       QMAC QASCII.MAC QASCII.QM /B /A-
  71.  
  72. QMac will build QASCII.MAC from the information in QASCII.QM.
  73. Now, from inside QEdit, you can issue the command MacroRead
  74. <ESC><M><R>, and specify QASCII.MAC, to load the macro into QEdit
  75. for use.
  76.  
  77. For convenient use of macros of this type, QEdit version 2.08 or
  78. higher (and QEdit for OS/2, and QEdit TSR), has two command line
  79. switches.  The /L switch will load a macro file into QEdit on
  80. startup, so the macros will be ready for your use as soon as you
  81. enter the editor.  For example, if you type at the DOS prompt:
  82.  
  83.       Q myfile.txt /Lmymacros.mac
  84.  
  85. then the macros in the file MYMACROS.MAC will be loaded into
  86. QEdit along with the text file MYFILE.TXT.
  87.  
  88. The /E switch will EXECUTE the first macro in the named
  89. file, and then discard it.  Both /L and /E require a binary macro
  90. file name immediately after the switch and you can use a
  91. different or the same file name on both switches, if you combine
  92. them.
  93.  
  94. You may wish to supply a full drive and directory specification
  95. for your macro files when using /L and /E, so that QEdit can find
  96. them.
  97.  
  98.  
  99. MACROS.QM
  100. ---------
  101. This file contains a variety of short macros that were submitted
  102. by users.  These are all short enough so they can be put in your
  103. keyboard definition file, or used separately via QMac.
  104.  
  105. Some of the macros in this file include column copying and
  106. deleting commands, automatic loading of help or macro files, and
  107. a way to reload the current file from disk to get a fresh copy.
  108.  
  109. See the comments inside MACROS.QM for further details.
  110.  
  111.  
  112. BIGFIND.QM
  113. ----------
  114. This macro interfaces one of several external file searching
  115. programs with QEdit.  With it, you can do "regular expression"
  116. searching, even though QEdit does not have this capability built
  117. in.
  118.  
  119. The macro behaves differently than QEdit's own search and
  120. replace, because of the nature of external searching utilities.
  121. It must invoke the external program to do all the searching, then
  122. present the final results to you.
  123.  
  124. The macro is structured so that a screen filled with the found
  125. text appears at the end of the search.  You move the cursor to
  126. the line you would like to the cursor to be positioned on, and
  127. press Return.  QEdit will take you to that position in your
  128. original file.
  129.  
  130. Three separate macros are present in this file.  You should choose
  131. the one that matches the external find utility that you plan to
  132. use.  The first one uses the FIND command that comes with MS-DOS
  133. and PC-DOS.  The second one uses a free program called FGREP that
  134. can be found on many BBS's.  The third one can be used with most
  135. popular GREP utilities, including the ones that Borland and
  136. Microsoft supply with their language products.
  137.  
  138. Chose the macro that matches your search utility, convert it to a
  139. binary macro, and load it into QEdit.  See the comments inside
  140. BIGFIND.QM for further details.
  141.  
  142.  
  143. CHANGE.QM
  144. ---------
  145. This macro allows you to do a global search and replace on any
  146. number of files, all from the QEdit command line (or from
  147. inside QEdit).  It is a good example of how auto-execute macros
  148. can be used to make QEdit automate various tasks.
  149.  
  150. Normally, you invoke this macro from the DOS command line, by
  151. calling up QEdit as follows:
  152.  
  153.         Q first.fil second.fil third.fil /Echange.mac
  154.  
  155. The macro will pause and prompt you for a search and replace
  156. operation, just as it would in QEdit.  Answer the prompts
  157. normally, or press <Escape> to abort the process.
  158.  
  159. When the prompts are completed, the macro will proceed to execute
  160. that search and replace globally across all the files you loaded
  161. via the command line.  When the last file is saved to disk, the
  162. editor will exit back to DOS, or to the EditFile prompt
  163. (depending on how you have it configured).
  164.  
  165. Thus, through this macro you can use QEdit as a command line
  166. utility to do search and replace operations on hundreds of files
  167. at a time!  Be careful, though:  since the replace operation does
  168. not pause at each replacement, you could potentially change many,
  169. many files in one operation with this macro.  Be sure you are
  170. using the right set of files!
  171.  
  172.  
  173. QASCII
  174. ------
  175. These macros implement a "built in" ASCII table for QEdit.
  176.  
  177. It allows you to place the cursor on a key to be looked up, press
  178. one key, and have the Decimal, Hexadecimal, Binary, and English
  179. representation of that character appear.  The format of the ASCII
  180. chart is completely up to the user, but a sample file is supplied
  181. in QASCII.LST.
  182.  
  183. You will probably need to edit the macros in QASCII.QM to include
  184. the full drive, directory and name of your QASCII.LST file, so
  185. the macros will work equally well from any directory.  As is, the
  186. macros assume that QASCII.LST is always present in the current
  187. directory.
  188.  
  189. The QASCII.LST file is free-form, with one ASCII character
  190. represented per line.  The only restriction is that each
  191. character appear between parentheses in QASCII.LST, only once.
  192.  
  193. The Control-F4 macro requires that the ASCII character itself
  194. appear in Column 24 of each line, and that the first ASCII
  195. character appears on line 6 of the file.  If you change the
  196. format of the ASCII chart, you will have to edit the third macro
  197. appropriately, particularly the GotoLine and GotoColumn commands.
  198.  
  199. The rest of each line in QASCII.LST can contain numeric or other
  200. descriptions of that ASCII character, subject to your whim.  The
  201. sample QASCII.LST displays the character in Decimal, Hexadecimal,
  202. Binary, and by Name.
  203.  
  204. Due to restrictions on ASCII text files, and the way QEdit reads
  205. them, the Carriage Return, Line feed and Tab characters cannot
  206. appear "literally" in the QASCII.LST file.  The sample file has
  207. these characters translated to 00h, but their descriptions are
  208. left in for completeness.
  209.  
  210. There are three macros supplied.  The first one will "look up"
  211. the character under the cursor, bringing the ASCII chart up on
  212. the screen as a window below the current one.
  213.  
  214. The second one also looks up the current character, but it
  215. displays the results in a box near the cursor line.  Press
  216. <Return> or <Escape> to continue editing.
  217.  
  218. The third macro opens the ASCII chart and places the cursor in
  219. it.  The user can then scroll to a desired ASCII character, and
  220. then press <Return>.  The ASCII character on the cursor line will
  221. be inserted in your original file for you.  This is intended as
  222. an easier way to find and insert certain characters that are
  223. difficult to type.
  224.  
  225. Try all three macros out to see which one(s) you like best.  See
  226. the comments inside QASCII.QM for further information.
  227.  
  228.  
  229. SCRATCHS.QM
  230. -----------
  231. This macro is an auto-execute macro for use with the /E
  232. switch in QEdit.  Its purpose is to prepare a set of named
  233. Scratch Buffers by loading them with pre-set text from a file.
  234.  
  235. Scratch Buffers are very handy for storing often used text,
  236. but unfortunately they are lost when you exit QEdit.  Using
  237. this macro, you can have a permanent copy of your scratch
  238. buffers kept in an editable disk file, and have them loaded
  239. into the appropriate spots every time QEdit loads.
  240.  
  241. This could be very handy with QEdit TSR.  By executing this macro
  242. when you load QEdit TSR, the loaded scratch buffers would be
  243. available for use in the editor until you turn your computer off
  244. or purge QEdit TSR from memory.
  245.  
  246. This macro loads your scratch buffers from a file called
  247. SCRATCHS.LST.  You chould edit the macro in SCRATCHS.QM before
  248. translating it with QMac, to include the full drive and directory
  249. of your SCRATCHS.LST file.  As is, the macro assumes that this
  250. file is always present in the current directory.
  251.  
  252. This is automated through use of the /E command line switch of
  253. QEdit.  You can invoke QEdit as follows:
  254.  
  255.      Q myfile.txt /Escratchs.mac
  256.  
  257. and the SCRATCHS macro will automatically execute, preparing your
  258. scratch buffers for use in editing.
  259.  
  260. If you invoke QEdit via a batch file, you can arrange for the /E
  261. parameter to be supplied every time without having to type it,
  262. saving some trouble.   Or, you can use utilities like CED, PCED,
  263. 4DOS or ANARKEY to supply the /E parameter for you automatically.
  264.  
  265. See inside SCRATCHS.QM for details on its use.
  266.  
  267. SCRATCHS.LST is a sample data file for use with this macro, edit
  268. this to include your scratch buffer text.
  269.  
  270.  
  271. ACKNOWLEDGEMENTS
  272. ----------------
  273. Several of these files were originally submitted by users on
  274. SemWare's BBS.  Thanks to the users who contributed, and others
  275. for their input.                         
  276.  
  277.  
  278. CONTACT
  279. -------
  280. If you have any questions or suggestions, please contact:
  281.  
  282. SemWare
  283. 4343 Shallowford Road
  284. Suite C-3
  285. Marietta, GA  30062-5003
  286.  
  287. Voice Phone: (404) 641-9002   9 a.m to 5 p.m. E.T., Mon-Fri.
  288. BBS Phone:   (404) 641-8968,  2400 bps
  289.  
  290.  
  291. REVISION HISTORY
  292. ----------------
  293. Version 1.00 -- 17-Nov-1989
  294.         Initial version.
  295.  
  296. Version 2.10 -- 27-Feb-1990
  297.         CHANGES.QM and SCRATCHS.QM modified to take advantage
  298.         of new Jump commands in QEdit.
  299.  
  300.             * * *  end  * * *
  301.