Category : Word Processors
Archive   : QEDMACS1.ZIP
Filename : MACROS.DOC

Output of file : MACROS.DOC contained in archive : QEDMACS1.ZIP

QEDIT Marcos for
San Antonio BBSs
September 22, 1988

Okay, QEDIT Jocks:

I'm big on logging off messages from various local or
national boards. But, between the kernals of great truth
are lots of -largely housekeeping -chaff (E.g., origin of
the message). I also have a cerebral problem with writing
down the first message in a thread so that I can return to
the next one after it to pick up the next thread.
Consequently, I also needed a method for appending the
scratch buffer quickly. So I came up with QEDMACS1.ARC. In
it are the .MAC files and the derivitive .TXT files for
editing messages from the following San Antonio boards:
macro names are pretty self evident. Looking at the text
files will tell you which Alt (@) keys are functional for
that given macro.)

IN ALL CASES, Alt-1 is a single unit (non global) change,
which was the way I was able induce the macros to add lines or
to delete them, or to take out individual variables like the
Time or Status.

IN ALL CASES, Alt-2 is the main global key which, among
other things, moves the Subject of the message over to about
the 35th column for easier reading.

I have also made up some particular use macros that do
single acts, such as deleting a line that says "To: All"
with one, two or three spaces after the ":", and such as
deleting one or two extra lines between the "Subject:" and
the body of a message.

The file HELPSCRN.DOC shows the English (sorta) translation
of the various .MACs. To make this file into a popup I used
the PC Magazine Vol7N1.ARC HELP/CAPTURE to create the
appropriate .BIN files. I use the following ED.BAT to
call up QEDIT (Which I call Q206B921) after loading the help
files (called HELP922.BIN here). (The /n8 means to allow 8
pages of popup; the /hz means to invoke the popup using @z -
you may change this to any @-alpha you like). The last line
of the batch file unhooks the help popup from TSR status (so
your @z key won't remain enslaved to the popup),

echo off
help HELP922.BIN /n8 /hz >nul
Q206B921 %1
help /u >nul

Page 2

I also added the following internal macros to my QEDIT
configuration file (using the 255 space line because I had
trouble making the QMAC program accept my "&"s to go to
continue the macro on the next line).

@i macrobegin markblockend gotoblockbeg appendscrbuff
"keep" return markline cursordown
@g macrobegin getscrbuff "keep" return
@k macrobegin markline markline storescrbuff "keep" return
^a macrobegin markblockbegin maketopofscreen cursordown
cursordown cursordown cursordown cursordown
cursordown cursordown cursordown cursordown cursordown
cursordown cursordown cursordown cursordown cursordown
cursordown markblockend

The purpose of these macros is to aid in the gathering up of
like-subject messages and appending them into a scratch
buffer called "Keep" 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.) If it remained
highlighted, life would be easier. (Better yet, a MOVE to
scratch buffer would be a godsend)

Here's what these keys do:

@i Following a previously placed MARKBLOCKBEGIN, @i marks
the end of the block, returns to the start of the
block, appends the block to a scratch buffer named
"Keep," and (because I want to remark for block for
deletion) begins marking the same block again by
invoking markline and moving the cursor down to the
next line, dragging the highlighting with it.
(I chose @i as "insert.")

@g This macro simply "gets" all the contents of the "keep"
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
"keep" 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 "keep" 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.)

^a Starts a block and highlights 16 lines. Gives a quick
start to a blocking operation
Page 3


To invoke a macro for use, ESC to the menu, enter M for
macro, then R for read, then enter the full name, including
path (if the macros are in a different subdirectory or disk
and you're not using DATAPATH or some other non executable
file pather), e.g.:


Don't worry about dueling @-keys: The incoming new macro
will redefine the @-keys (I figured this out by looking at
the QED2BOX.ARC files.)


I included a copy of my entire configuration file because
I am mildly proud of the way I have reconfigured the keys to
facilitate editing actions. For example, I find it very
easy to keep a thumb on the Alt key and use my left hand to
hit the keys on the left side of the keyboard. Also, I find
it inconvenient and difficult to use the Ctrl key. So
things that would upset me if they happened by mistake are
invoked from the Ctrl keys.

Page 4


In the process of making these macros, I discovered
various things about QMAC.EXE that ain't in the writeup.
Being a relative neophyte computist, I *could* be dead wrong
on some of this stuff, especially the real causes of things,
but here follows the way some things seem to work:

1. QMAC seems prone to run afoul of TSRs. Sometimes I had
to enter the entire command line, including "options" to get
it to work. (The first input request would appear, but I
would be lockup up and no entry was possible.)

2. Sometimes converting a .TXT file to a .MAC file would
yield and error message that pointed to and "error" that I
couldn't understand. However, simply doing a warm boot
would clean whatever was ailing it and the .TXT would
compile successfully with no change from before the reboot.

3. I had a really hard time in getting QMAC to accept my
"&" symbol for continuing a macro on the next line. I
finally figured out to input the ASCII symbols for "&"
"" and "line feed" (38 13 10 in decimal) and that seemed
to work.

Alternatively, one may cop out by always using a 255 space
line when editing a .TXT file. That's what I did.

4. When working within a single session of QEDIT any
macros created or invoked are retained and will be written
to a new macro created by the ESC M(acro) W(rite) process.
For example, Load APCOmac.MAC (ESC M R APCOMAC.MAC) and
you'll have macros assigned to keys @[email protected] Then create a
new macro assigned to @5 which enters the word "APCO
MESSAGES" every time the @5 key is struck. To save this new
macro, you ESC M W NEWAPCO.MAC . When you:


and then edit NEWAPCO.TXT you will see that what you have is
the combination of the macros for @1 through @5.

I don't know the way to avoid this, except to delete those
extra macros while in the .TXT file and to recompile NEWAPCO.MAC.

5. OVERWRITING: If in the example above the new macro
had been named @1 instead of @5, it would have overwritten
and @1 macro in APCOmac.MAC when you wrote it to file.
(That's why it is prudent to sequentially number EACH new
macro deleting or overwriting NOTHING until you are
satisfied that you have what you want.)

NOTE: What I'm trying to say here is different from the
overwriting that occurs when loading .MAC files as you edit
different message bases. The newly-loaded .MAC will
overwrite any trigger keys that it shares with a
previously-loaded macro brought in during that same session.
I use this to advantage by triggering most of my macros with
the Alt keys. There is no problem so long as you don't do
an EST M W Macroname.MAC and write whatever you have in
effect currently into an old .MAC file.


In the words of The Captain (Kangaroo), "Share." If you
see something in these words that proves I suffer from
rectocranial inversion syndrome, please respond. Tell me
what you have learned, that your truth may be as a lamp unto
my feet. Correct my spelling. Make my day.

Example: I couldn't get a global macro to implement line
deletes or deletes to ends of lines. Have you? How?