home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / q / qedtips1.zip / TECH2.MSG < prev    next >
Text File  |  1992-06-24  |  6KB  |  126 lines

  1.           A QEdit Tip from the SemWare Technical Support Staff
  2.  
  3.                         .. QMac: The Basic's ..
  4.  
  5.         QMac is a translator of QEdit macro files.  It translates QEdit
  6.         macros from the binary file in which QEdit saves macros to a
  7.         text file which allows easy macro editing, and translates such
  8.         text files back into a QEdit binary file.
  9.  
  10.         This allows you to "record" a macro using QEdit; fine-tune it by
  11.         editing the text representation of the macro; and then translate
  12.         the edited version and reload it into QEdit for replay.
  13.  
  14.         QMac allows appending to or overwriting existing files, making
  15.         it easy to add new macros to existing files. QMac's text file
  16.         format allows comments, permitting documentation of the macros
  17.         within their "source file".
  18.  
  19.         To see a summary of QMac's operations, type "QMAC ?" at the DOS
  20.         prompt and press Return.  All of the command line switches are
  21.         optional and are only necessary to control QMac's operation in
  22.         special ways.
  23.  
  24.         Here is quick run-through of what you can do with QMac,
  25.         including recording a macro, saving it to disk, and converting
  26.         it with QMac.  The keystrokes mentioned below assume you are
  27.         using the default QCONFIG.DAT supplied with QEdit; if you have
  28.         re-installed your keyboard using QCONFIG, please modify as
  29.         needed.
  30.  
  31.         Recording a Macro:
  32.         ~~~~~~~~~~~~~~~~~
  33.         1. From inside QEdit, select MacroRecord.  (Either hit <Ctrl M>
  34.         or select "Macro record" from the "Macro" menu in the pull-down
  35.         menu system, by pressing <Escape><M><M>).
  36.  
  37.         2. At the prompt that says "Assign to what key:" press a key to
  38.         redefine.  We will use <Ctrl F10>
  39.  
  40.         3. Press Find <Ctrl QF>, type "the" and press Return, and type
  41.         "IW" and press Return again.  (This is just an example of what
  42.         you can do, you could of course record any legal series of QEdit
  43.         keystrokes here.)
  44.  
  45.         4. Select MacroRecord again to end the macro, like step 1 above.
  46.  
  47.         5. Now, you can press <Ctrl F10> to search for the word "the" in
  48.         your text in just one step.
  49.  
  50.         Saving the Macro:
  51.         ~~~~~~~~~~~~~~~~
  52.         6. Let's write this macro to disk in a file that QMac can use.
  53.         Select MacroWrite from the pull down menus, by pressing <Escape>
  54.         then <M><W>.
  55.  
  56.         7. Give it a filename of "FIND.MAC", and press Return to save
  57.         this macro on disk.
  58.  
  59.         Converting the Macro to Text:
  60.         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  61.         8. Press Dos <Alt F9> to send a command to MS-DOS. Type:
  62.  
  63.              QMAC FIND.MAC FIND.TXT /A- /T
  64.  
  65.         to convert FIND.MAC to a text form in the file FIND.TXT. Press
  66.         Return.  (The /T selects text output).
  67.  
  68.         9. Press EditFile <Alt E> to load this file into QEdit. Type
  69.         "FIND.TXT" to load the text file you just created with QMac.
  70.         Press Return.  You should see something like this on the screen:
  71.  
  72.              * * Converted by QMAC from: C:\FIND.MAC * ^f10
  73.              MacroBegin Find "the" Return "IW" Return
  74.  
  75.         Which is, of course, a text representation of the keystrokes you
  76.         just recorded.
  77.  
  78.         10. You can now edit your macro if need be.  Let's change the
  79.         word "the" to "and", and save the file back to disk by pressing
  80.         File <Ctrl KX>.
  81.  
  82.         Converting the Macro from Text back to Binary:
  83.         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  84.         11. Press Dos <Alt F9> to send a another command to MS- DOS.
  85.         This time, type:
  86.  
  87.              QMAC FIND.MAC FIND.TXT /A- /B
  88.  
  89.         to convert FIND.TXT back to its BINARY form, FIND.MAC. (NOTE
  90.         that we use /B to tell QMac to make the binary file from the
  91.         text file we just edited).  Press Return.
  92.  
  93.         QMac Additional Notes:
  94.         ~~~~~~~~~~~~~~~~~~~~~
  95.         QMac will create whichever of the two files (binary or text)
  96.         that did not exist already:  If the text macros already exist,
  97.         it will convert them to binary.  Or if the binary macros already
  98.         exist, it will convert them to text.
  99.  
  100.         However, if both files exist, you must supply one of the
  101.         optional switches to determine the direction.  The switch /B
  102.         tells QMac to create a Binary file, while /T tells it to create
  103.         a text file.
  104.  
  105.         If the output file already exists, you must also supply a /A+ or
  106.         /A- switch to tell QMac whether to "append" to the existing
  107.         file. With /A+ it will append, /A- tells QMac to overwrite the
  108.         existing file.
  109.  
  110.         Anywhere an asterisk ("*") appears on a line, outside of a
  111.         quoted string, the rest of the line is treated as a "comment"
  112.         and is ignored by QMac.  You can use this to include notes to
  113.         yourself about how your macros work, or what they are supposed
  114.         to do.  Comments are not included in the binary macro file that
  115.         QEdit loads, so there is no penalty for including them in your
  116.         text macro files.
  117.  
  118.         A macro can continue onto more than one line, simply indent the
  119.         second and subsequent lines of the macro one or more spaces.
  120.         The macro continues until QMac runs out of text or encounters
  121.         another key at the beginning of a subsequent line.
  122.  
  123.         Lines in your text macro files can be up to 512 characters long.
  124.  
  125.         Matthew Giles (SemWare Technical Support)
  126.