home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frostbyte's 1980s DOS Shareware Collection
/
floppyshareware.zip
/
floppyshareware
/
SOUR
/
#1_QTIPS.ZIP
/
TECH2.MSG
< prev
next >
Wrap
Text File
|
1992-06-24
|
6KB
|
126 lines
A QEdit Tip from the SemWare Technical Support Staff
.. QMac: The Basic's ..
QMac is a translator of QEdit macro files. It translates QEdit
macros from the binary file in which QEdit saves macros to a
text file which allows easy macro editing, and translates such
text files back into a QEdit binary file.
This allows you to "record" a macro using QEdit; fine-tune it by
editing the text representation of the macro; and then translate
the edited version and reload it into QEdit for replay.
QMac allows appending to or overwriting existing files, making
it easy to add new macros to existing files. QMac's text file
format allows comments, permitting documentation of the macros
within their "source file".
To see a summary of QMac's operations, type "QMAC ?" at the DOS
prompt and press Return. All of the command line switches are
optional and are only necessary to control QMac's operation in
special ways.
Here is quick run-through of what you can do with QMac,
including recording a macro, saving it to disk, and converting
it with QMac. The keystrokes mentioned below assume you are
using the default QCONFIG.DAT supplied with QEdit; if you have
re-installed your keyboard using QCONFIG, please modify as
needed.
Recording a Macro:
~~~~~~~~~~~~~~~~~
1. From inside QEdit, select MacroRecord. (Either hit <Ctrl M>
or select "Macro record" from the "Macro" menu in the pull-down
menu system, by pressing <Escape><M><M>).
2. At the prompt that says "Assign to what key:" press a key to
redefine. We will use <Ctrl F10>
3. Press Find <Ctrl QF>, type "the" and press Return, and type
"IW" and press Return again. (This is just an example of what
you can do, you could of course record any legal series of QEdit
keystrokes here.)
4. Select MacroRecord again to end the macro, like step 1 above.
5. Now, you can press <Ctrl F10> to search for the word "the" in
your text in just one step.
Saving the Macro:
~~~~~~~~~~~~~~~~
6. Let's write this macro to disk in a file that QMac can use.
Select MacroWrite from the pull down menus, by pressing <Escape>
then <M><W>.
7. Give it a filename of "FIND.MAC", and press Return to save
this macro on disk.
Converting the Macro to Text:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8. Press Dos <Alt F9> to send a command to MS-DOS. Type:
QMAC FIND.MAC FIND.TXT /A- /T
to convert FIND.MAC to a text form in the file FIND.TXT. Press
Return. (The /T selects text output).
9. Press EditFile <Alt E> to load this file into QEdit. Type
"FIND.TXT" to load the text file you just created with QMac.
Press Return. You should see something like this on the screen:
* * Converted by QMAC from: C:\FIND.MAC * ^f10
MacroBegin Find "the" Return "IW" Return
Which is, of course, a text representation of the keystrokes you
just recorded.
10. You can now edit your macro if need be. Let's change the
word "the" to "and", and save the file back to disk by pressing
File <Ctrl KX>.
Converting the Macro from Text back to Binary:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11. Press Dos <Alt F9> to send a another command to MS- DOS.
This time, type:
QMAC FIND.MAC FIND.TXT /A- /B
to convert FIND.TXT back to its BINARY form, FIND.MAC. (NOTE
that we use /B to tell QMac to make the binary file from the
text file we just edited). Press Return.
QMac Additional Notes:
~~~~~~~~~~~~~~~~~~~~~
QMac will create whichever of the two files (binary or text)
that did not exist already: If the text macros already exist,
it will convert them to binary. Or if the binary macros already
exist, it will convert them to text.
However, if both files exist, you must supply one of the
optional switches to determine the direction. The switch /B
tells QMac to create a Binary file, while /T tells it to create
a text file.
If the output file already exists, you must also supply a /A+ or
/A- switch to tell QMac whether to "append" to the existing
file. With /A+ it will append, /A- tells QMac to overwrite the
existing file.
Anywhere an asterisk ("*") appears on a line, outside of a
quoted string, the rest of the line is treated as a "comment"
and is ignored by QMac. You can use this to include notes to
yourself about how your macros work, or what they are supposed
to do. Comments are not included in the binary macro file that
QEdit loads, so there is no penalty for including them in your
text macro files.
A macro can continue onto more than one line, simply indent the
second and subsequent lines of the macro one or more spaces.
The macro continues until QMac runs out of text or encounters
another key at the beginning of a subsequent line.
Lines in your text macro files can be up to 512 characters long.
Matthew Giles (SemWare Technical Support)