home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 September / Simtel20_Sept92.cdr / msdos / qedit / qintmac1.arc / INTMACS.DOC next >
Text File  |  1988-09-29  |  9KB  |  182 lines

  1.                            Internal Macros
  2.                            For QEDIT 2.06B
  3.                          Version 1.0 9/29/88
  4.  
  5.                              Kirk Bubul
  6.  
  7. I added the following internal macros to my QEDIT configuration file.
  8. I found that in the process of editing various message base logs I
  9. wanted to move various messages around, delete the lines that started
  10. with "More:" (but which ended with various other words/symbols), and
  11. generally clean up the look of the messages.  Because I am not a
  12. programmer, I had to feel my way through QMAC and QEDIT.  (For
  13. example, I use a 255 space line within the QCONFIG.DAT file because I
  14. haven't be able to make QEDIT program accept my "&"s to continue the
  15. macro on the next line)
  16.  
  17. Here are the macros.  The explanation of each follows:
  18.  
  19. @i       macrobegin addline "Rumplestiltskin" cursorup endline
  20.          markblockend gotoblockbeg appendscrbuff "YIN" return
  21.          markline find "Rumplestiltskin" return return deleteblock
  22.          maketopofscreen
  23. @g       macrobegin getscrbuff "YIN" return
  24. @k       macrobegin markline markline storescrbuff "YIN" return
  25. @v       macrobegin markline markline appendscrbuff "YIN" return delline
  26.  
  27. Explanation:
  28.  
  29. The purpose of these macros is to aid in the gathering up of
  30. like-subject messages and appending them into a scratch buffer called
  31. "YIN" for later relocation elsewhere in the program.  One of the QEDIT
  32. features I don't like is the fact that a highlighted block that is
  33. added to a scratch buffer has the highlight removed as part of the
  34. process of being put to the buffer (Please! Sammy.)  So I created the
  35. Rumplestiltskin trick to overcome it.
  36.  
  37. Here's what these keys do:
  38.  
  39. @i   Following a previously placed MARKBLOCKBEGIN, @i marks
  40.      the end of the block, moves the cursor down one line and
  41.      writes the word "Rumplestiltskin to serve as a unique
  42.      marker for refinding this spot, goes up one line and to the end
  43.      of the line, and marks the end of the block. It then returns
  44.      to the start of the block, appends the block to a scratch buffer
  45.      named "YIN," (There is a "YANG" set that does the same thing,
  46.      except that it uses the buffer "YANG" and DOES NOT DELETE a block
  47.      after copying it to the buffer.) then remarks the same block by
  48.      invoking markline and finding "Rumplestiltskin."  The old block,
  49.      plus the "Rumplestiltskin" line are now all highlighted and removed.
  50.      (I chose @i as "insert.")
  51.  
  52. @v   Does the same thing as @i except it marks, buffers, and deletes
  53.      a SINGLE LINE.  I find this very convenient for quick rough sorting,
  54.      such as one would do after dumping a quick scan of a message base.
  55.  
  56. @g   This macro simply "gets" all the contents of the "YIN" buffer and
  57.      sticks it on the line above the cursor. Like and buffer in QEDIT, the
  58.      contents remain unless removed, so I also created:
  59.  
  60.  
  61.  
  62.  
  63.  
  64. @k   To clean out the buffer (Remember that @i always APPENDS), @k
  65.      "kleans" by marking the cursor line and STORING (rather than
  66.      appending) that line to the "YIN" buffer.  Since the @g always results
  67.      in the cursor being on a blank line, it is easy to @g, observe that
  68.      the buffered stuff did write to where you wanted, then hit @k to empty
  69.      "YIN" for the next set of messages on another topic. (Yes, I know that
  70.      I could stick the klean function onto the back end of @g, but Bubul's
  71.      Law is even harsher than Murphy's Law when it comes to asserting a
  72.      propensity for doing Really Dumb Things.  Here, two steps *are* better
  73.      than one.)
  74.  
  75.  
  76. Here are some other macros that I find very useful.
  77.  
  78. This just deletes the 30 spaces to the right of the cursor:
  79.  
  80. ^e       macrobegin delch delch delch delch delch delch delch delch &
  81.          delch delch delch delch delch delch delch delch delch delch  &
  82.          delch delch delch delch delch delch delch delch delch delch delch delchkeep
  83.  
  84. This deletes the next 20 spaces to the right of the cursor:
  85.  
  86. ^d       macrobegin delch delch delch delch delch delch delch delch delch
  87.          delch delch delch delch delch delch delch delch delch delch delch
  88.  
  89. This deletes the next 10 spaces to the right of the cursor
  90.  
  91. ^c       macrobegin delch delch delch delch delch delch delch delch delch delch
  92.  
  93. To find the next occurrance of the word "More:" (Especially useful when
  94. using the since screen prompt.)  I made ^g the delete so my pinky
  95. could rest on the control key and my index finger could dance between
  96. ^f and ^g to find and delete these lines.
  97.  
  98. ^f       macrobegin find "More:" return return
  99. ^g       delline
  100.  
  101. To get rid of those ASCII 08 code things that tend to clutter up some
  102. of the "More" lines
  103.  
  104. ^y       macrobegin findreplace "" return " " backspace return return "g"
  105.  
  106. To jump 40 spaces across a line (If in 8-column tab defaule *and* NOT
  107. in insert mode):
  108.  
  109. ^i       macrobegin tab_rt tab_rt tab_rt tab_rt tab_rt
  110.  
  111. Last, to get a running start on highlighting the next block for YINing
  112. or YANGing or deleting, ^a marks the start of a block, then highlights
  113. the next 16 lines:
  114.  
  115. ^a       macrobegin markblockbegin maketopofscreen cursordown
  116.          cursordown cursordown cursordown cursordown
  117.          cursordown cursordown cursordown cursordown cursordown
  118.          cursordown cursordown cursordown cursordown cursordown
  119.          cursordown markblockend
  120.  
  121.  
  122.  
  123. USING THE MACROS
  124.  
  125.   Once you have typed these macros into your QCONFIG.DAT file and
  126. have run QCONFIG.EXE successfully, you are ready to use these macros.
  127. Because they are in the configuration, they are always available
  128. without any special loading.
  129.  
  130.  
  131. THE HELP SCREEN.
  132.  
  133.   As you can tell from my choice of function keys for these macros,  I
  134. have greatly modified the QEDIT configuration in order to facilitate
  135. using my left hand and the keys that are within easy reach of it.
  136. Therefore, I have included my QHLP928.TXT file which shows these
  137. keys.
  138.  
  139. ┌─ Qedit Help (See @z for Command Help)────────────────────────────────────────┐
  140. │                                                                              │
  141. │Macros Within the Program                                                     │
  142. │                                                                              │
  143. │ ^c  Del 10 sp at the cursor       ^d  Del 20        ^c Del 30                │
  144. │                                                                              │
  145. │ ^y  Find all 's & del'em                                                    │
  146. │                                                                              │
  147. │ ^f  Find "More:"                 ^g  Del_line                                │
  148. │                                                                              │
  149. │ ^2  Macro_read (to load a macro)                                             │
  150. │                                                                              │
  151. │ ^h  Horizontal_window (split window)(to load a new file)                     │
  152. │                                                                              │
  153. │ ^i  tab_rt 5 times (to jump 1/2 line right)                                  │
  154. │                                                                              │
  155. │ ^a  Markblockbegin and highlight 16 lines(jump start block mark)      "Yang" │
  156. │ @i  Markblockend, Append into YIN, then DELETE block                    ^r   │
  157. │ @v  Markline on a single line, append into keep, then delete that line  ^v   │
  158. │ @g  Getscrbuff "KEEP"                                                   ^s   │
  159. │ @k  Klean scrbuff by @l@l & storing to scrbuff                          ^t   │
  160. │                                                                              │
  161. └──────────────────────────────────────────────────────────────────────────────┘
  162.  
  163. You will note that the top of this help screen mentions using @z to
  164. see the Command Help.  I used the Capture and Help commands from PC
  165. Magazine to create a 7-page help table. Two pages are devoted to my
  166. configuration of all the QEDIT action keys, and five pages are devoted
  167. to the helps for the external macros I have created to help in editing
  168. the message bases from the bulletin boards that I call.
  169.  
  170. To load the HELP file going into QEDIT, and to unload it coming out, I
  171. used the following ED.BAT:
  172.  
  173. echo off
  174. help help928.bin /n8 /hz >nul
  175. q929 %1
  176. help /u >nul
  177.  
  178. I hope that this helps you folks.  I'd be interested in seeing what
  179. neat things others have done
  180.  
  181.  
  182.