home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
qedit
/
qintmac1.arc
/
INTMACS.DOC
next >
Wrap
Text File
|
1988-09-29
|
9KB
|
182 lines
Internal Macros
For QEDIT 2.06B
Version 1.0 9/29/88
Kirk Bubul
I added the following internal macros to my QEDIT configuration file.
I found that in the process of editing various message base logs I
wanted to move various messages around, delete the lines that started
with "More:" (but which ended with various other words/symbols), and
generally clean up the look of the messages. Because I am not a
programmer, I had to feel my way through QMAC and QEDIT. (For
example, I use a 255 space line within the QCONFIG.DAT file because I
haven't be able to make QEDIT program accept my "&"s to continue the
macro on the next line)
Here are the macros. The explanation of each follows:
@i macrobegin addline "Rumplestiltskin" cursorup endline
markblockend gotoblockbeg appendscrbuff "YIN" return
markline find "Rumplestiltskin" return return deleteblock
maketopofscreen
@g macrobegin getscrbuff "YIN" return
@k macrobegin markline markline storescrbuff "YIN" return
@v macrobegin markline markline appendscrbuff "YIN" return delline
Explanation:
The purpose of these macros is to aid in the gathering up of
like-subject messages and appending them into a scratch buffer called
"YIN" for later relocation elsewhere in the program. One of the QEDIT
features I don't like is the fact that a highlighted block that is
added to a scratch buffer has the highlight removed as part of the
process of being put to the buffer (Please! Sammy.) So I created the
Rumplestiltskin trick to overcome it.
Here's what these keys do:
@i Following a previously placed MARKBLOCKBEGIN, @i marks
the end of the block, moves the cursor down one line and
writes the word "Rumplestiltskin to serve as a unique
marker for refinding this spot, goes up one line and to the end
of the line, and marks the end of the block. It then returns
to the start of the block, appends the block to a scratch buffer
named "YIN," (There is a "YANG" set that does the same thing,
except that it uses the buffer "YANG" and DOES NOT DELETE a block
after copying it to the buffer.) then remarks the same block by
invoking markline and finding "Rumplestiltskin." The old block,
plus the "Rumplestiltskin" line are now all highlighted and removed.
(I chose @i as "insert.")
@v Does the same thing as @i except it marks, buffers, and deletes
a SINGLE LINE. I find this very convenient for quick rough sorting,
such as one would do after dumping a quick scan of a message base.
@g This macro simply "gets" all the contents of the "YIN" buffer and
sticks it on the line above the cursor. Like and buffer in QEDIT, the
contents remain unless removed, so I also created:
@k To clean out the buffer (Remember that @i always APPENDS), @k
"kleans" by marking the cursor line and STORING (rather than
appending) that line to the "YIN" buffer. Since the @g always results
in the cursor being on a blank line, it is easy to @g, observe that
the buffered stuff did write to where you wanted, then hit @k to empty
"YIN" for the next set of messages on another topic. (Yes, I know that
I could stick the klean function onto the back end of @g, but Bubul's
Law is even harsher than Murphy's Law when it comes to asserting a
propensity for doing Really Dumb Things. Here, two steps *are* better
than one.)
Here are some other macros that I find very useful.
This just deletes the 30 spaces to the right of the cursor:
^e macrobegin delch delch delch delch delch delch delch delch &
delch delch delch delch delch delch delch delch delch delch &
delch delch delch delch delch delch delch delch delch delch delch delchkeep
This deletes the next 20 spaces to the right of the cursor:
^d macrobegin delch delch delch delch delch delch delch delch delch
delch delch delch delch delch delch delch delch delch delch delch
This deletes the next 10 spaces to the right of the cursor
^c macrobegin delch delch delch delch delch delch delch delch delch delch
To find the next occurrance of the word "More:" (Especially useful when
using the since screen prompt.) I made ^g the delete so my pinky
could rest on the control key and my index finger could dance between
^f and ^g to find and delete these lines.
^f macrobegin find "More:" return return
^g delline
To get rid of those ASCII 08 code things that tend to clutter up some
of the "More" lines
^y macrobegin findreplace "" return " " backspace return return "g"
To jump 40 spaces across a line (If in 8-column tab defaule *and* NOT
in insert mode):
^i macrobegin tab_rt tab_rt tab_rt tab_rt tab_rt
Last, to get a running start on highlighting the next block for YINing
or YANGing or deleting, ^a marks the start of a block, then highlights
the next 16 lines:
^a macrobegin markblockbegin maketopofscreen cursordown
cursordown cursordown cursordown cursordown
cursordown cursordown cursordown cursordown cursordown
cursordown cursordown cursordown cursordown cursordown
cursordown markblockend
USING THE MACROS
Once you have typed these macros into your QCONFIG.DAT file and
have run QCONFIG.EXE successfully, you are ready to use these macros.
Because they are in the configuration, they are always available
without any special loading.
THE HELP SCREEN.
As you can tell from my choice of function keys for these macros, I
have greatly modified the QEDIT configuration in order to facilitate
using my left hand and the keys that are within easy reach of it.
Therefore, I have included my QHLP928.TXT file which shows these
keys.
┌─ Qedit Help (See @z for Command Help)────────────────────────────────────────┐
│ │
│Macros Within the Program │
│ │
│ ^c Del 10 sp at the cursor ^d Del 20 ^c Del 30 │
│ │
│ ^y Find all 's & del'em │
│ │
│ ^f Find "More:" ^g Del_line │
│ │
│ ^2 Macro_read (to load a macro) │
│ │
│ ^h Horizontal_window (split window)(to load a new file) │
│ │
│ ^i tab_rt 5 times (to jump 1/2 line right) │
│ │
│ ^a Markblockbegin and highlight 16 lines(jump start block mark) "Yang" │
│ @i Markblockend, Append into YIN, then DELETE block ^r │
│ @v Markline on a single line, append into keep, then delete that line ^v │
│ @g Getscrbuff "KEEP" ^s │
│ @k Klean scrbuff by @l@l & storing to scrbuff ^t │
│ │
└──────────────────────────────────────────────────────────────────────────────┘
You will note that the top of this help screen mentions using @z to
see the Command Help. I used the Capture and Help commands from PC
Magazine to create a 7-page help table. Two pages are devoted to my
configuration of all the QEDIT action keys, and five pages are devoted
to the helps for the external macros I have created to help in editing
the message bases from the bulletin boards that I call.
To load the HELP file going into QEDIT, and to unload it coming out, I
used the following ED.BAT:
echo off
help help928.bin /n8 /hz >nul
q929 %1
help /u >nul
I hope that this helps you folks. I'd be interested in seeing what
neat things others have done