home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / tse2jr4.zip / QTIPS.DOC < prev    next >
Text File  |  1997-02-21  |  63KB  |  1,341 lines

  1.               A compilation of The SemWare Editor Junior Tips
  2.                   from the SemWare Technical Support Staff
  3.  
  4.  
  5. Alternate Cut, Copy, and Paste macros with ability to append
  6. ──────────────────────────────────────────────────────────────────────────────
  7.  
  8.   The current behavior of these commands is as follows:
  9.  
  10.     Cut   - place marked text into Scrap Buffer, delete it from the file
  11.     Copy  - place marked text into Scrap Buffer, block will be unmarked only
  12.     Paste - insert the contents of the Scrap Buffer at current cursor
  13.             position
  14.  
  15.   The following macros give these commands a new behavior:
  16.  
  17.     Cut   - "append" marked text to Scrap Buffer, delete it from the file
  18.     Copy  - "append" marked text to Scrap Buffer, unmark block
  19.     Paste - insert the contents of the Scrap Buffer at current cursor
  20.             position
  21.     Empty - clear the contents of the Scrap Buffer
  22.  
  23.     Initially the Scrap Buffer is empty, but as text is Cut or Copied, it
  24.     gets appended to the Scrap Buffer.  Each Cut or Copy will continue to
  25.     append the text to the Scrap Buffer.  Use the Empty macro to clear the
  26.     Scrap Buffer contents.
  27.  
  28.     If no block is marked, the Cut and Copy macros will use the current
  29.     cursor line, and move the cursor to the next line.  This allows you to
  30.     easily cut or copy a series of lines by repeatedly pressing the Cut or
  31.     Copy macro key.
  32.  
  33.     The contents of the Scrap Buffer are not emptied when the Paste macro is
  34.     used.  This allows the text to be pasted multiple times.
  35.  
  36. *
  37. * Paste
  38. *
  39. grey*           SetScreenOff        * turn OFF screen updating
  40.                 GetScrBuff          * paste text from scratch buff
  41.                 "_MY_CLIP_" Return  * specify our scratch buff
  42.                 UnMarkBlock         * remove this line to leave block marked
  43.  
  44. *
  45. * Empty
  46. *
  47. ^del            DelScrBuff          * delete contents of scratch buff
  48.                 "_MY_CLIP_" Return  * specify our scratch buff
  49.  
  50. *
  51. * Copy
  52. *
  53. grey+           SetScreenOff        * turn OFF screen updating
  54.                 AppendScrBuff       * attempt to append to scratch buff
  55.                 Jump mark           * if AppendScrBuff fails, jump to mark
  56.                 "_MY_CLIP_" Return  * else tell it which scratch buff to us
  57.                 UnMarkBlock         * unmark the block
  58.                 MacroQuit           * and quit
  59.         mark:   UnMarkBlock         * make sure there is no block marked
  60.                 MarkLine            * mark the current line
  61.                 AppendScrBuff       * append to scratch buff
  62.                 MacroQuitFalse      * quit if failed
  63.                 "_MY_CLIP_" Return  * specify our scratch buff
  64.                 UnMarkBlock         * unmark the block
  65.                 CursorDown          * and cursor down to next line
  66.  
  67. *
  68. * Cut
  69. *
  70. grey-           SetScreenOff        * turn OFF screen updating
  71.                 AppendScrBuff       * attempt to append to scratch buff
  72.                 Jump mark           * if AppendScrBuff fails, jump to mark
  73.                 "_MY_CLIP_" Return  * else tell it which scratch buff to us
  74.                 DeleteBlock         * delete the block
  75.                 MacroQuit           * and quit
  76.         mark:   UnMarkBlock         * make sure there is no block marked
  77.                 MarkLine            * mark the current line
  78.                 AppendScrBuff       * append to scratch buff
  79.                 MacroQuitFalse      * quit if failed
  80.                 "_MY_CLIP_" Return  * specify our scratch buff
  81.                 DeleteBlock         * delete block, cursor now on next line
  82.  
  83.  
  84. Macros and Prompt Boxes - special tricks
  85. ──────────────────────────────────────────────────────────────────────────────
  86.  
  87.   In many cases, it would be ideal for macros to know if they have been
  88.   interrupted by a Menu or Prompt - otherwise, the typical result is that
  89.   the rest of the macro is gobbled up by the Prompt, looking for a valid
  90.   command to execute.
  91.  
  92.   There just so happens to exist a little know feature that allows you to
  93.   determine if a Prompt is active.  You do this by taking advantage of the
  94.   Jump or MacroQuit commands.
  95.  
  96.   The logic goes like this:  The MacroQuit and Jump commands are not
  97.   operational inside a Prompt, so, if the command is not successful, a
  98.   Prompt must currently be active.
  99.  
  100.   For example, suppose you want a WriteBlockAndAppendIfExists command.
  101.  
  102.   @w WriteBlock Pause Return
  103.      MacroQuit        * if the macro is finished, stop now
  104.                       * otherwise (MacroQuit ignored) we must be in a prompt
  105.       'A'             * force appending of the file
  106.  
  107.   Similar logic, using the Jump command:
  108.  
  109.   @w WriteBlock Pause Return
  110.      Jump end         * if the macro is finished, stop now
  111.                       * otherwise (Jump ignored) we must be in a prompt
  112.       'A'             * force appending of the file
  113.      end:
  114.  
  115.  
  116. Using Copy and Paste in Prompts
  117. ─────────────────────────────────────────────────────────────────────────────
  118.  
  119.   In The SemWare Editor Junior you can answer a prompt by using the copy and
  120.   paste commands. This technique is really useful for loading files and
  121.   searching for words in the current document.
  122.  
  123.   For example, a macro to look for the next occurrence of the current word
  124.   at the cursor could be done like this:
  125.  
  126.   * Macro for TSE Jr.: Find next occurrence of current word.
  127.   @=          MarkWord            * Mark current word.
  128.               MacroQuitFalse      * If no word to mark, quit macro.
  129.               Copy                * Copy marked text to scrap.
  130.               Find                * Call find command, displays prompt.
  131.               Paste               * Paste scrap into Find prompt.
  132.               Return              * Accept the entry in the prompt.
  133.               Return              * Accept the current search options.
  134.  
  135.   This can also be used for editing a file.  You can mark the name of the
  136.   file that you want to edit in a file, the select EditFile (<Alt E>), and
  137.   copy the name into the prompt and then press <Enter>.
  138.  
  139.  
  140. The InsertDate Command in TSE Jr. 2.15
  141. ─────────────────────────────────────────────────────────────────────────────
  142.  
  143.   In TSE Jr. versions 2.15 and earlier, when you used the InsertDate command,
  144.   the output contained the full year:
  145.  
  146.                              Tue 11-02-1993
  147.  
  148.  
  149.   However, in The SemWare Editor Junior, output of InsertDate does not
  150.   contain the first part of the year:
  151.  
  152.                               Tue 11-02-93
  153.  
  154.   To insert the "19" part of the year, use the following macro:
  155.  
  156.   <KEY>   SaveSettings        * Save Settings of Insert, WordWrap, etc.
  157.           SetScreenOff        * Turn OFF screen updates
  158.           InsertDate          * Insert the Date
  159.           SetInsMode          * Set Insert ON
  160.           CursorLeft  2       * Move Back to the beginning of the year
  161.           "19"                * Insert the 19 part of the year
  162.           CursorRight 2       * Move to the end of the year
  163.           RestoreSettings     * Restore our original condition
  164.  
  165.   This macro can be bound to any available key in your QCONFIG.DAT file.
  166.  
  167.  
  168. Converting TSE Jr. 2.x and 3.0 macros to The SemWare Editor Junior 4.0
  169. ─────────────────────────────────────────────────────────────────────────────
  170.  
  171.   The binary macro files compiled with QMAC from TSE Jr. 3.0 and earlier are
  172.   not completely compatible with The SemWare Editor Junior 4.0.  However,
  173.   there is a painless process to convert your macros.
  174.  
  175.   To follow this process you will need to determine if you have text file
  176.   versions of your macros.  If you do not, you will need to follow this
  177.   process:
  178.  
  179.     (1) Copy all of your binary macro files (*.MAC) to a temporary directory.
  180.  
  181.     (2) Copy the QMAC program (QMAC.EXE) from your TSE Jr. 2.x/3.0 directory to
  182.         your temporary directory.
  183.  
  184.     (3) For each of the *.MAC files, run QMAC to convert them to text files.
  185.         For example:
  186.  
  187.             C:\QETMP>QMAC <FileName>.MAC <FileName>.Q /A- /T
  188.  
  189.         Where <FileName> is the file to convert.
  190.  
  191.   This process creates the text file versions of your macros.  The files
  192.   will have the same name as the original macros, but with a ".Q" extension.
  193.  
  194.   This process is for everyone. It will convert your TSE Jr. 2.x/3.0 macros
  195.   into TSE Jr. 4.0 macros:
  196.  
  197.     (1) Copy all of text macro files (for those who followed the first
  198.         process: the *.Q files in the temporary directory) to your TSE Jr. 4.0
  199.         directory.
  200.  
  201.     (2) For each of the text macro files, run the new QMAC program to convert
  202.         them to binary files.  For example:
  203.  
  204.             C:\QE3>QMAC <FileName>.MAC <FileName>.Q /A- /B
  205.  
  206.   That is it!  You have now successfully re-compiled your macros.
  207.  
  208.  
  209. Multi-Line Macro Format
  210. ─────────────────────────────────────────────────────────────────────────────
  211.  
  212.   Since TSE Jr. 3.0, you can have multi-line macros in your QCONFIG.DAT file.
  213.   This capability gives you much more power over previous versions.  If you
  214.   are upgrading from TSE Jr. 3.0, you may skip this section.
  215.  
  216.   When upgrading from TSE Jr. 2.15 (or earlier) there are a couple of
  217.   conventions that must be followed when formatting your QCONFIG.DAT file:
  218.  
  219.     (1) The key must appear in the first column of the command assignment or
  220.         macro.
  221.  
  222.     (2) When writing macros, all succeeding lines must be indented one or more
  223.         columns.
  224.  
  225.   The reason for these conventions is to differentiate between commands and
  226.   keys.  Consider this example, which does NOT follow the new conventions:
  227.  
  228.     * This comment starts in column one.
  229.     *
  230.         CursorDown CursorDown BegLine
  231.         CursorUp CursorUp BegLine
  232.  
  233.   Before TSE Jr. 3.0, the first word on each line would have been interpreted
  234.   as a key automatically.  However, with multi-line macros it is no longer
  235.   clear exactly what the user intended here.  These lines could be seen as
  236.   either two individual key assignments, or as a single macro. (Granted, it
  237.   would be a silly macro -- one step forward and two steps back!)
  238.  
  239.   Here is an example of a few key assignments that follow the new format:
  240.  
  241.     * This comment starts in column one.
  242.     *
  243.     ^k_h        BegLine                             * Fancy Home Macro
  244.                 isCurrChar ' ' MacroQuitFalse
  245.                 FirstNonWhite
  246.  
  247.     CursorDown  CursorDown                          * Down / BegLine
  248.                 BegLine
  249.  
  250.     CursorUp    CursorUp BegLine                    * Up / BegLine
  251.  
  252.  
  253. Startup Macros
  254. ─────────────────────────────────────────────────────────────────────────────
  255.  
  256.   The SemWare Editor Junior has the capability of loading and/or executing
  257.   your compiled macro files on startup through the use of command line
  258.   parameters. The macro files being used must be in binary format created
  259.   using the MacroWrite command <Esc><M><W> command or QMAC.
  260.  
  261.   To LOAD a macro from the command line enter "-l" or "/l" (a dash or slash
  262.   and the letter "l") followed immediately by a macro filename.  The maximum
  263.   size of a loadable macro file is 2k. The format for loading a macro
  264.   follows:
  265.  
  266.           q <filename to edit> -l<macro filename>
  267.  
  268.   To EXECUTE a macro from the command line enter "-e" or "/e" followed
  269.   immediately by a macro filename.  The maximum size of an executed macro is
  270.   500 bytes.  The format for executing a macro on startup follows:
  271.  
  272.           q <filename to edit> -e<macro filename>
  273.  
  274.   When using the execute ("-e or /e") option, the first macro in the
  275.   macrofile is executed.  The macro is then executed only after the file to
  276.   be edited has been loaded.  The macro file is executed once and not loaded
  277.   into the editor.
  278.  
  279.   A filename must be supplied to make use of the command line parameters.
  280.   Both the load and execute macro parameters may be used at the same time.
  281.   The order that they are specified on the command line is not important.
  282.   The format for executing a macro and loading a macrofile on startup
  283.   follows:
  284.  
  285.           q <edit filename> -e<macro filename> -l<macro filename>
  286.  
  287.   To illustrate the above, suppose you want to edit a file called WORK.TMP
  288.   and at the same time, from the command line, load the macro file called
  289.   FIRST.MAC and execute the macro file called SECOND.MAC.  From the command
  290.   line you would enter:
  291.  
  292.           q work.tmp -lfirst.mac -esecond.mac
  293.  
  294.  
  295. QMac: The Basics
  296. ─────────────────────────────────────────────────────────────────────────────
  297.  
  298.   QMac is a translator of The SemWare Editor Junior macro files.  It
  299.   translates macros from the binary file, to a text file which allows easy
  300.   macro editing, and translates such text files back into a binary file.
  301.  
  302.   This allows you to "record" a macro using the editor; fine-tune it by
  303.   editing the text representation of the macro; and then translate the
  304.   edited version and reload it into the editor for replay.
  305.  
  306.   QMac allows appending to or overwriting existing files, making it easy to
  307.   add new macros to existing files. QMac's text file format allows comments,
  308.   permitting documentation of the macros within their "source file".
  309.  
  310.   To see a summary of QMac's operations, type "QMAC ?" at the DOS prompt and
  311.   press <Enter>.  All of the command-line switches are optional and are only
  312.   necessary to control QMac's operation in special ways.
  313.  
  314.   Here is a quick run-through of what you can do with QMac, including
  315.   recording a macro, saving it to disk, and converting it with QMac. The
  316.   keystrokes mentioned below assume you are using the default QCONFIG.DAT
  317.   supplied with The SemWare Editor Junior; if you have re-installed your
  318.   keyboard using QCONFIG, please modify as needed.
  319.  
  320.   Recording a Macro:
  321.   ~~~~~~~~~~~~~~~~~
  322.   1. From inside the editor, select MacroRecord.  (Either hit <Ctrl M> or
  323.   select "Macro Record" from the "Macro" menu in the pull-down menu system,
  324.   by pressing <Esc><M><M>).
  325.  
  326.   2. At the prompt that says "Assign to what key:" press a key to redefine.
  327.   We will use <Ctrl F10>
  328.  
  329.   3. Execute Find <Ctrl QF>, type "the" and press <Enter>, and type "IW" and
  330.   press <Enter> again.  (This is just an example of what you can do.  You
  331.   could of course record any legal series of editor keystrokes here.)
  332.  
  333.   4. Select MacroRecord again to end the macro, like step 1 above.
  334.  
  335.   5. Now, you can press <Ctrl F10> to search for the word "the" in your text
  336.   in just one step.
  337.  
  338.   Saving the Macro:
  339.   ~~~~~~~~~~~~~~~~
  340.   6. Let's write this macro to disk in a file that QMac can use. Select
  341.   MacroWrite from the pull-down menus, by pressing <Esc> then <M><W>.
  342.  
  343.   7. Give it a filename of "FIND.MAC", and press <Enter> to save this macro
  344.   on disk.
  345.  
  346.   Converting the Macro to Text:
  347.   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  348.   8. Execute Dos <Alt F9> to send a command to MS-DOS. Type:
  349.  
  350.        QMAC FIND.MAC FIND.TXT /A- /T
  351.  
  352.   to convert FIND.MAC to a text form in the file FIND.TXT.  Press <Enter>.
  353.   (The /T selects text output).
  354.  
  355.   9. Execute EditFile <Alt E> to load this file into the editor. Type
  356.   "FIND.TXT" to load the text file you just created with QMac.  Press
  357.   <Enter>.  You should see something like this on the screen:
  358.  
  359.        * * Converted by QMAC from: C:\FIND.MAC *
  360.        ^f10 MacroBegin Find "the" Return "IW" Return
  361.  
  362.   Which is, of course, a text representation of the keystrokes you just
  363.   recorded.
  364.  
  365.   10. You can now edit your macro if necessary.  Let's change the word "the"
  366.   to "and", and save the file back to disk by executing File <Ctrl KX>.
  367.  
  368.   Converting the Macro from Text back to Binary:
  369.   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  370.   11. Execute Dos <Alt F9> to send a another command to MS-DOS. This time,
  371.   type:
  372.  
  373.        QMAC FIND.MAC FIND.TXT /A- /B
  374.  
  375.   to convert FIND.TXT back to its BINARY form, FIND.MAC. (NOTE that we use
  376.   /B to tell QMac to make the binary file from the text file we just
  377.   edited.)  Press <Enter>.
  378.  
  379.   QMac Additional Notes:
  380.   ~~~~~~~~~~~~~~~~~~~~~
  381.   QMac will create whichever of the two files (binary or text) that did not
  382.   exist already.  If the text macros already exist, it will convert them to
  383.   binary.  Or if the binary macros already exist, it will convert them to
  384.   text.
  385.  
  386.   However, if both files exist, you must supply one of the optional switches
  387.   to determine the direction.  The switch /B tells QMac to create a Binary
  388.   file, while /T tells it to create a text file.
  389.  
  390.   If the output file already exists, you must also supply a /A+ or /A-
  391.   switch to tell QMac whether to "append" to the existing file. With /A+ it
  392.   will append, /A- tells QMac to overwrite the existing file.
  393.  
  394.   Anywhere an asterisk ("*") appears on a line, outside of a quoted string,
  395.   the rest of the line is treated as a "comment" and is ignored by QMac.
  396.   You can use this to include notes to yourself about how your macros work,
  397.   or what they are supposed to do.  Comments are not included in the binary
  398.   macro file that the editor loads, so there is no penalty for including
  399.   them in your text macro files.
  400.  
  401.   A macro can continue onto more than one line. Simply indent the second and
  402.   subsequent lines of the macro one or more spaces.  The macro continues
  403.   until QMac runs out of text or encounters another key at the beginning of
  404.   a subsequent line.
  405.  
  406.  
  407. The SemWare Editor Junior in 28-line or 43/50-line Mode on Startup
  408. ─────────────────────────────────────────────────────────────────────────────
  409.  
  410.   If you want to have the editor start up in 28-line or 43/50-line mode, you
  411.   can select the "Startup video mode" option under Colors/Screen in the
  412.   QCONFIG program. Using this option, you can force the editor to come up in
  413.   28-line or 43/50-line mode.
  414.  
  415.  
  416. Saving Files and Exiting
  417. ─────────────────────────────────────────────────────────────────────────────
  418.  
  419.   The editor provides several different ways to save files, discard files,
  420.   and exit the editor.  A set of five basic commands provides various
  421.   combinations of saving, discarding, and exiting in order to suit
  422.   individual preferences.
  423.  
  424.   We recommend selecting one or two methods with which you feel most
  425.   comfortable and use them consistently.  Below is a description of the
  426.   basic commands for both single and multiple files along with our default
  427.   key combinations.
  428.  
  429.   1)  SaveFile <Ctrl K><S> - save the currently edited file to disk. The
  430.           file remains loaded into the editor for further editing.
  431.  
  432.       GSave <Alt Y> - Like the SaveFile command, but it issues the SaveFile
  433.           command for all the files that have been modified.
  434.  
  435.   2)  File <Ctrl K><X> - Unconditionally saves and then discards the current
  436.           file.  It then either goes to the next file in the editor file
  437.           ring or the "File(s) to edit" prompt.
  438.  
  439.       GFile <Alt F><G> - Like the File command, but it instructs the editor
  440.           to save all files that have been modified and then discards all
  441.           the files that are loaded and exits.
  442.  
  443.   3)  Exit <Ctrl K><D> - Conditionally discards the currently edited file.
  444.           If the file has not been modified, the file is discarded without
  445.           prompting and the editor is exited.  If the file has been
  446.           modified, the editor will prompt "Save Changes (Y/N)?"  Selecting
  447.           <Y> will save and discard the file, then exit.  Selecting <N> will
  448.           discard the file without saving any changes and exit.
  449.  
  450.       GExit <Alt X> - Like the Exit command, but it issues the Exit command
  451.           for all loaded files.  If no files have been modified, it will
  452.           immediately exit the editor.  If any files have been modified, the
  453.           "Save Changes (Y/N)?" prompt will be displayed for each modified
  454.           file.
  455.  
  456.   4)  PQuit <Ctrl K><Q> -  A protected quit that will warn the user of a
  457.           modified file before discarding the file.  If the file has not
  458.           been modified, it is discarded without prompting. If the file has
  459.           been modified, the editor will prompt "Lose Changes (Y/N)?"
  460.           Selecting <Y> will discard the current file without saving changes
  461.           and then either go to the next file in the editor file ring or the
  462.           "File(s) to Edit" prompt. Selecting <N> will return you to the
  463.           file to resume editing.
  464.  
  465.       GPQuit <F3> - Like the PQuit command but it issues the PQuit command
  466.           for all loaded files.  If no files have been modified, it will
  467.           immediately exit the editor.  If any files have been modified, the
  468.           "Lose Changes (Y/N)?" prompt will be displayed for each modified
  469.           file and then the editor is exited.
  470.  
  471.   5)  Quit - An unconditional quit.  The current file is discarded
  472.           regardless of any changes made to it.  NOTE: Use this command with
  473.           caution! The Quit command is not assigned to a default keystroke.
  474.  
  475.   The Exit, File, PQuit commands can be configured to terminate or not
  476.   terminate the editor and ask for another file to edit. This option can be
  477.   customized using the configuration program QCONFIG.EXE.  Run QCONFIG.EXE,
  478.   select G)eneral Options, and return till you get to the option that reads:
  479.  
  480.       Do you want the PQuit, Exit and File commands to return to "EditFile"
  481.       prompt (Y/N)? [Y]
  482.  
  483.   The default configuration is set to <Y> and will return you to the
  484.   EditFile prompt upon executing the PQuit, Exit, and File commands or go to
  485.   the next file in the editor file ring.  If set to <N>, it will terminate
  486.   the editor upon executing the above commands.  The SaveFile and Quit
  487.   commands are not affected by this setting.
  488.  
  489.   A Few Recommendations:
  490.   ~~~~~~~~~~~~~~~~~~~~~
  491.   *  If you know what you are doing and want to get in and out of the editor
  492.      quickly, use the GFile command.
  493.  
  494.   *  If you want to make one more final check before you exit the editor,
  495.      use the GExit.
  496.  
  497.   *  PQuit/GPQuit and Exit/GExit are not intended to be used at the same
  498.      time, but to give the user opposing approaches to saving files and
  499.      exiting the editor.
  500.  
  501.  
  502. Types of Block Marking and Unmarking
  503. ─────────────────────────────────────────────────────────────────────────────
  504.  
  505.   A block is a portion of a text file which has been defined by using the
  506.   editor's Block marking commands.  The editor has a rich set of Block
  507.   commands.  These commands mark Blocks by lines, columns, and characters.
  508.  
  509.   To define a block, you must first "mark" or outline a Block. There are
  510.   four Block types available:  line, column, inclusive character blocks, and
  511.   non-inclusive character blocks.  The one you choose will depend on the
  512.   editing situation and what you feel most comfortable using.  Below is a
  513.   description of the commands along with our default key combinations.
  514.  
  515.   MarkLine <Alt L> - will mark only complete lines and no portions of lines.
  516.       To use this command, place the cursor anywhere on the first line of
  517.       the text you want to mark and press <Alt L>.  Now move the cursor to
  518.       the last line of text you wish to be marked and press <Alt L> again.
  519.  
  520.   DropAnchor <Alt A> - will mark a Block one character at a time. The Block
  521.       will contain a stream of characters and can span over multiple lines.
  522.       To use this command, place the cursor over the first character of text
  523.       you wish to mark and press <Alt A>.  Now move the cursor toward the
  524.       end of text to be marked. (Notice that the Block "follows" the cursor
  525.       position.)  Once the cursor is placed over the last character to be
  526.       marked, press <Alt A> again.
  527.  
  528.   MarkCharacter - will work just like DropAnchor except that while the Block
  529.       is being marked, the cursor is NOT included within the Block.
  530.       MarkCharacter is not assigned to a default keystroke.
  531.  
  532.   MarkColumn <Alt K> - will mark one or more columns of text. To use this
  533.       command, place the cursor over the upper left-hand character of the
  534.       text you wish to mark and press <Alt K>. Now move the cursor to the
  535.       right and/or downward toward the end of text to be marked.  (Notice
  536.       that the Block "follows" the cursor position.)  Once the cursor is
  537.       placed over the lower right-hand character of the Block, press <Alt K>
  538.       again.
  539.  
  540.   MarkBlockBegin <Ctrl K><B> and MarkBlockEnd <Ctrl K><K> - will mark one
  541.       character at a time.  These commands do NOT show the block until
  542.       MarkBlockEnd is executed.  To use this command, place the cursor over
  543.       the first character of the text you wish to mark and press <Ctrl
  544.       K><B>. Now position the cursor one character past the end of the text
  545.       that is to be marked and press <Ctrl K><K>.
  546.  
  547.   MarkWord <Ctrl K><T> - will mark a single word.  To use this command,
  548.      place the cursor at the first character of the word you wish to mark
  549.      and press <Ctrl K><T>. (If no word is at the current cursor position,
  550.      then no action is taken.)
  551.  
  552.   UnMarkBlock <Alt U> - will cause the currently marked Block to be
  553.   unmarked.
  554.  
  555.   A few side notes:
  556.   ~~~~~~~~~~~~~~~~
  557.   *  The editor allows you to mark only one Block at a time.
  558.  
  559.   *  If you mix Block types, the editor will mark the Block according to the
  560.      last command entered.
  561.  
  562.   *  MarkCharacter is provided as a replacement for the DropAnchor command.
  563.      If you want the cursor position included in the character Blocks, then
  564.      continue to use DropAnchor; otherwise, replace the DropAnchor command
  565.      with MarkCharacter in the QCONFIG.DAT file.
  566.  
  567.   *  When using MarkLine, MarkCharacter, MarkColumn, and DropAnchor
  568.      commands, it is not necessary to mark the end of the Block.  The editor
  569.      will assume the end of the Block to be the current cursor position
  570.      and/or line depending on the command being used.  Marking the end of
  571.      the Block is only necessary when moving or copying text within the same
  572.      file.
  573.  
  574.  
  575. Manipulating Marked Blocks (Part A)
  576. ─────────────────────────────────────────────────────────────────────────────
  577.  
  578.   The editor provides several ways to manipulate a marked Block.
  579.   Manipulation can be done directly, using the Scrap Buffer (ClipBoard), or
  580.   using the Scratch Buffers.  Following is a description of each of the
  581.   editor's block manipulation commands along with our default key
  582.   combinations.
  583.  
  584.   Manipulating Directly
  585.   ~~~~~~~~~~~~~~~~~~~~~
  586.   The following commands allow you to manipulate a marked Block directly.
  587.  
  588.   CopyBlock <Alt C> - will make a copy of the marked Block and insert it
  589.       where you decide.  This can be either in another place in the same
  590.       file, or in another file.  To use this command, mark the Block and
  591.       move the cursor to the position where you wish to insert the marked
  592.       text. Now press <Alt C> and notice the Block will be inserted at the
  593.       new position. To unmark the copied Block, enter the UnmarkBlock
  594.       command.
  595.  
  596.   CopyOverBlock <Alt Z> - will work just like the CopyBlock command except
  597.       the Block is copied to the current cursor position by overlaying the
  598.       existing text.  The command can ONLY be used with column Blocks.  The
  599.       Block will be inserted without shifting the text to the right.
  600.  
  601.   MoveBlock <Alt M> - will work just like the CopyBlock command except that
  602.       upon entering the MoveBlock command, the original marked Block is
  603.       deleted from the file.
  604.  
  605.   DeleteBlock <Alt G> - will delete a marked Block of text from the file.
  606.       To use this command, mark the Block of text to be deleted, then enter
  607.       the DeleteBlock command.
  608.  
  609.   ShiftLeft <Shift F7> and ShiftRight <Shift F8> - will shift the text
  610.       contained in a marked Block one column to the left or right.  To use
  611.       these commands, mark the Block and enter the ShiftLeft or ShiftRight
  612.       command.  If there is not a marked Block or the cursor is outside of
  613.       the Block, the current cursor line will be shifted.
  614.  
  615.   Manipulating Using the Scrap Buffer (Clipboard)
  616.   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  617.   The Scrap Buffer is a temporary holding area for marked Blocks of text.
  618.   The commands Cut, Copy, Paste, and PasteOver are solely responsible for
  619.   manipulating text to and from the Scrap Buffer.
  620.  
  621.   Cut <grey -> - will copy the marked Block into the Scrap Buffer. The Block
  622.       is then deleted from the file being edited.  If no Block is marked,
  623.       the cursor line is cut into the Scrap Buffer.
  624.  
  625.   Copy <grey +> - will copy the marked Block into the Scrap Buffer and then
  626.       unmark the Block.  If no Block is marked, the cursor line is copied
  627.       into the Scrap Buffer.
  628.  
  629.   Paste <grey *> - will insert the contents of the Scrap Buffer to the
  630.       current cursor position.  If the Scrap Buffer contains a character or
  631.       column Block, it is inserted at the cursor position.  If the Scrap
  632.       Buffer contains a line Block, it is inserted before or after the
  633.       cursor line depending on the configuration setting.
  634.  
  635.   PasteOver <Ctrl PrtSc> - will work like the Paste command, but for column
  636.       Blocks.  It takes a column Block which has been loaded into the Scrap
  637.       Buffer using the Cut or Copy commands and places it at the current
  638.       cursor position by overlaying the existing text and without shifting
  639.       text to the right.
  640.  
  641.   When you issue a Copy or Cut command, the marked Block is placed in the
  642.   Scrap Buffer.  The next time you Copy or Cut a Block into the Scrap
  643.   Buffer, the previous contents of the Scrap Buffer are deleted and replaced
  644.   with the new Block.
  645.  
  646.   You can use the Paste and PasteOver commands as many times as needed to
  647.   insert a copy of the Block held in the Scrap Buffer at multiple positions
  648.   in your file or files.  The Paste and PasteOver commands will not purge
  649.   the contents of the Scrap Buffer.
  650.  
  651.   The Cut and Copy commands can be configured to act on the current cursor
  652.   line if no Block is marked.  This option can be customized using the
  653.   configuration program QCONFIG.EXE.  Run QCONFIG.EXE, select A)dvanced
  654.   options, and return till you get to the option that reads:
  655.  
  656.     Should Cut and Copy use the current line if no block marked (Y/N)? [N]
  657.  
  658.   The default configuration is set to <N> and will result in no action if
  659.   the Cut and Copy commands are used outside of a block. If set to <Y>, the
  660.   editor will use the current cursor line when the Cut and Copy commands are
  661.   issued.
  662.  
  663.   Manipulating Using the Scratch Buffer
  664.   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  665.   A Scratch Buffer is a special type of buffer to which you assign a name.
  666.   The editor allows you to create and name up to 99 Scratch Buffers for each
  667.   editing session.  These can be useful if you have several different Blocks
  668.   of text that you want to insert in multiple locations.  The commands
  669.   StoreScrbuff, AppendScrbuff, and GetScrbuff are used to place text in, and
  670.   retrieve text from, a Scratch Buffer.  When you issue one of these
  671.   commands, the editor will ask you for the name of the Scratch Buffer. The
  672.   contents of all Scratch Buffers are discarded when the editor is
  673.   terminated.
  674.  
  675.   StoreScrbuff <Ctrl B><S> - will copy the marked Block to the named Scratch
  676.       Buffer.  The editor will prompt for the name of the Scratch Buffer.
  677.  
  678.   AppendScrbuff <Ctrl B><A> - will append the marked Block to the end of the
  679.       named Scratch Buffer.  The existing contents of the named Scratch
  680.       Buffers are NOT lost.  If the named Scratch Buffer does not exist, a
  681.       new Scratch Buffer will be created.
  682.  
  683.   GetScrbuff <Ctrl B><L> - will insert the contents of the named Scratch
  684.       Buffer at the cursor position.
  685.  
  686.  
  687. Manipulating Marked Blocks (Part B)
  688. ─────────────────────────────────────────────────────────────────────────────
  689.  
  690.   The editor provides several other ways to manipulate a marked Block.
  691.   Manipulation of Marked Blocks can be done by using the Upper, Lower, Flip,
  692.   Sort, Fill, Print, and WriteBlock commands.  Following is a description of
  693.   each of the block manipulation commands along with our default key
  694.   combinations.
  695.  
  696.   Upper <Alt 1> - will change all characters in a marked block to upper case.
  697.  
  698.   Lower <Alt 2> - will change all characters in a marked block to lower case.
  699.  
  700.   Flip <Alt 3> - will reverse the case (upper to lower and lower to upper)
  701.       of all characters in a marked block.
  702.  
  703.   The Upper, Lower, and Flip commands must be used within the marked block.
  704.   If the cursor is outside of the marked block or if no block is marked, the
  705.   character at the current cursor position is changed to upper case.
  706.  
  707.   Sort <Shift F3> - will sort a range of lines in ascending order. The sort
  708.       key is determined by a marked column block.  The length of the column
  709.       block determines the range of lines to be sorted.
  710.  
  711.       This command can ONLY be used with a single, non-zoomed window on the
  712.       screen.
  713.  
  714.   FillBlock <Ctrl K><L> - will fill an entire block with any ASCII
  715.       character. FillBlock is recommended for use with column and word
  716.       blocks only because it will fill other type blocks with characters
  717.       beyond column 80.
  718.  
  719.   PrintBlock <Alt P><B> - will print the entire contents of the marked
  720.       Block. The marked Block must be in the current file.
  721.  
  722.   WriteBlock <Alt W> - will write the marked Block to the named file.  The
  723.       editor will prompt for the name of the file.
  724.  
  725.       This feature will also allow you to save your current file under a
  726.       different name.  To do so, press <Alt W> with no marked blocks in the
  727.       file.  The editor will prompt you for a filename. If the filename
  728.       already exists, the editor will prompt you with "Overlay existing
  729.       file" and "Append to file".  Select the option you desire or press
  730.       <Esc> to abort.
  731.  
  732.       If there is a marked block in the file, the WriteBlock command will,
  733.       as before, write the current marked block to the named file.
  734.  
  735.  
  736. The SemWare Editor Junior's Keyboard Configuration
  737. ─────────────────────────────────────────────────────────────────────────────
  738.  
  739.   Are you tired of signing your names to all those messages you write in the
  740.   editor?  Would you like to change the help screen to the F10 key like it
  741.   was in your "other" editor?  This is where the editor's flexible keyboard
  742.   configuration is extremely helpful. It will provide you with the ability
  743.   to assign editor commands and macros to almost any key you prefer.  Below
  744.   you will find an explanation of the editor's keyboard definition file
  745.   (QCONFIG.DAT) and how to modify it to meet YOUR needs.
  746.  
  747.   What is QCONFIG.DAT?
  748.   ~~~~~~~~~~~~~~~~~~~~
  749.   It is The SemWare Editor Junior's keyboard definition file which contains
  750.   the default settings for the keyboard.  This file contains a list of all
  751.   the keys to which commands may be assigned.
  752.  
  753.   The configurable keys are on the left side of the file with the commands
  754.   or macros assigned to the keys on the right.  Blank lines and lines
  755.   starting with an asterisk "*" are ignored.  The control, alternate, and
  756.   shift keys are used within QCONFIG.DAT to assign to commands.  The
  757.   following are some examples of each.
  758.  
  759.     - Control keys are specified with "^". (Example: ^F1 means Control F1)
  760.  
  761.     - Alternate keys are specified with "@". (Example: @F1 means Alternate F1)
  762.  
  763.     - Shift keys are specified with "#". (Example: #F1 means Shift F1)
  764.  
  765.   The case of the commands, as well as underscores in command names, are
  766.   ignored by the configuration program (QCONFIG.EXE). This means that
  767.   CursorDown, cursor_down, and Cursor_Down all refer to the same command.
  768.  
  769.   What are two-keys?
  770.   ~~~~~~~~~~~~~~~~~~
  771.   A two-key is a keystroke sequence assigned to two distinct keystrokes.
  772.   This allows for more key assignment possibilities. To assign a command to
  773.   a two-key, enter both of the keystrokes of the two-key in the first column
  774.   separated by an underline. The key here is that the commands must be
  775.   separated by a '_'.  For example, to assign the Exit command to the
  776.   two-key, <Ctrl F1><F2>, enter the following into your keyboard definition
  777.   file:
  778.  
  779.           ^F1_F2  Exit
  780.  
  781.   Any editor command can be assigned to a two-key, including macros.
  782.  
  783.   How can I modify MY TSE Jr. keys?
  784.   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  785.   Any user can modify his/her keys to suit their needs.  It is easy and
  786.   simple.  Just follow the steps below to modify your QCONFIG.DAT file.
  787.  
  788.           1.  Edit QCONFIG.DAT  (that is:  q QCONFIG.DAT).
  789.           2.  Make the appropriate changes to your QCONFIG.DAT file.
  790.               That is, change the definitions of @0 and ^F2 to be:
  791.  
  792.               @0      InsertDate
  793.  
  794.               ^F2     "Joe User" Return
  795.  
  796.               Remember that the first line of a command assignment must
  797.               start in column 1.  Command assignments can wrap or continue
  798.               for multiple lines, as long as each succeeding line starts in
  799.               a column greater than 1.
  800.  
  801.               Also remember that text should be enclosed in single or double
  802.               quotes.
  803.  
  804.           3.  Save your QCONFIG.DAT file.
  805.           4.  Run QCONFIG.EXE, enter program name and select K)eys
  806.           5.  Enter keyboard definition name
  807.           6.  Select S)ave options and quit
  808.  
  809.   You have now installed your new keyboard definitions into the editor. The
  810.   next time the editor is loaded, your new keys will be in effect.
  811.  
  812.   What if I liked the keys assignments on my "other" editor?
  813.   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  814.   There are many keyboard definition files written by users and SemWare
  815.   staff that will allow you to customize your copy of the editor to run like
  816.   another editor. You may find these additional keyboard definition files at
  817.   http://www.semware.com.  To install and/or edit the other keyboard
  818.   definition file, follow the steps above with the addition of entering the
  819.   new filename when it prompts you for the keyboard definition filename.
  820.  
  821.  
  822. The SemWare Editor Junior / Mem-Res Benefits
  823. ─────────────────────────────────────────────────────────────────────────────
  824.  
  825.   Have you ever been in a program and wanted to simply jot a note to
  826.   yourself? Have you ever had the need to take a quick look at a document,
  827.   but the program you were in had no shell option?  Then The SemWare Editor
  828.   Junior / Mem-Res, the memory-resident version of the editor, is for you!
  829.  
  830.   As a memory-resident version of the editor, TSE Jr./Mem-Res resides in the
  831.   background, giving you the power of the editor with a single keystroke,
  832.   but without having to exit the file you are working in.  Unlike more
  833.   familiar TSR programs, TSE Jr./Mem-Res utilizes a unique swapping feature
  834.   to provide the benefits of a TSR without draining precious memory.  TSE
  835.   Jr./Mem-Res uses less than 9k memory, and when popped up swaps your
  836.   current applications out of memory and into extended/expanded memory or
  837.   to disk. In this configuration, you can edit files up to 400k in size.
  838.  
  839.   The SemWare Editor Junior / Mem-Res contains all of The SemWare Editor
  840.   Junior commands, plus four additional commands.  These are described below
  841.   along with the default key combination for each.
  842.  
  843.   GrabScreen <Ctrl F10> - reads in the contents of the screen, as it
  844.       appeared when you popped up TSE Jr./Mem-Res as a marked block at your
  845.       current cursor position, and inserts it into the current file as a
  846.       marked block. The GrabScreen command behaves as if you were using the
  847.       ReadBlock command.
  848.  
  849.   GoBack <ESC><Q><G> - returns you to your DOS application, in the exact
  850.       configuration as when you left it.  The GoBack command can be
  851.       customized to prompt you to save edited files.  This is done by using
  852.       QMCONFIG, the TSE Jr./Mem-Res configuration program.
  853.  
  854.   Purge <ESC><Q><P> - purges TSE Jr./Mem-Res from memory after first
  855.       prompting the user to save any changed files.
  856.  
  857.   TsrPaste - "pastes" a marked block into the foreground application.
  858.       TsrPaste does not have a default keyboard assignment.  To use this
  859.       command, follow these steps:
  860.  
  861.       1) When the foreground application is waiting for input, pop up TSE
  862.          Jr./Mem-Res.
  863.  
  864.       2) Within TSE Jr./Mem-Res, mark a block of text and stuff it into the
  865.          keyboard buffer with the [TsrPaste] command (available as the last
  866.          item on the "Quit" pull-down menu).
  867.  
  868.       3) Quit TSE Jr./Mem-Res and return to the foreground application by
  869.          issuing the [GoBack] command, and the text will be immediately
  870.          pasted into the foreground application.
  871.  
  872.   Notes: Each line that is pasted, including single lines, has a carriage
  873.          return appended to it.
  874.  
  875.   Although The SemWare Editor Junior / Mem-Res has all the features The
  876.   SemWare Editor Junior is famous for, most users want a non-TSR editor as
  877.   well.  For this reason, TSE Jr./Mem-Res currently comes bundled with a
  878.   copy of the standard DOS version of The SemWare Editor Junior.
  879.  
  880.  
  881. The SemWare Editor Junior's Line/Box Drawing
  882. ─────────────────────────────────────────────────────────────────────────────
  883.  
  884.   Do you want to spice up your memos?  Do you want to draw boxes around text
  885.   to emphasize it?  Then the Line/Box-drawing feature is for YOU!  Give
  886.   emphasis to your documents without the need to use a drawing program.  It
  887.   is simple and easy to use!
  888.  
  889.   The editor contains two line-drawing commands.  These are described below
  890.   along with the default key combination for each.
  891.  
  892.   ToggleBoxDraw <Shift F1> - This mode of operation can be switched ON or
  893.       OFF.  When ON, the cursor movement keys (up, down, right, and left)
  894.       can be used to "draw" lines in the text.  To switch Line/Box Drawing
  895.       mode ON, enter <Shift F1>.  To switch it OFF, enter <Shift F1> again.
  896.  
  897.   ToggleBoxType <Alt F1> - This command prompts the user to select from
  898.       various line-drawing styles for use in the Line/Box-Drawing mode.  The
  899.       selectable options are:  single, double top, double side, double, and
  900.       eraser.
  901.  
  902.   The StatusLine indicates when the line/box-drawing mode is ON. The letter
  903.   'B' is displayed on the StatusLine when line/box-drawing mode is selected.
  904.  
  905.   To print the lines/boxes you have drawn in your text file, first set your
  906.   printer to use the IBM graphics character set.  Then use any of the
  907.   editor's printing options.
  908.  
  909.  
  910. The SemWare Editor Junior's Conditional Logic for Macros
  911. ─────────────────────────────────────────────────────────────────────────────
  912.  
  913.   Have you ever wanted to test to see if the cursor is at the beginning of
  914.   the line?  Have you ever wanted to perform a task only if you find what
  915.   you are searching for in a macro?  The editor brings you all the power of
  916.   looping and branching in its conditional logic commands.
  917.  
  918.   There are three commands in the editor for use within macros: Jump, JTrue,
  919.   and JFalse.  Placing one of these commands following another editor
  920.   command in a macro allows for branching or looping during macro execution.
  921.  
  922.   All editor commands set an internal result code to either "true" for
  923.   successful execution, or "false" for unsuccessful execution or if no
  924.   action occurs.  The Jump command makes an unconditional jump.   The JTrue
  925.   command makes a jump only when a result code of "true" is returned.
  926.   Likewise, the JFalse makes a jump only for a result code of "false".
  927.  
  928.   Labels can be defined for branching, in the format "label:". The maximum
  929.   label length is 15 characters.
  930.  
  931.   For example, here is a macro to delete from the cursor position to the
  932.   beginning of the line, and assigned to the f10 key:
  933.  
  934.           f10     begin:
  935.                      isEndLine
  936.                      jFalse continue
  937.                      EndLine
  938.                   continue:
  939.                      CursorLeft
  940.                      JFalse done:
  941.                      DelCh
  942.                      Jump begin:
  943.                   done:
  944.  
  945.   The following macro will delete from just left of the cursor position to
  946.   beginning of the line without shifting the remaining text or changing the
  947.   cursor position:
  948.  
  949.   f1   setscreenoff     * will avoid screen "flicker" when macro is executed
  950.  
  951.        splitline        * "saves" the text from the cursor position to eol down
  952.                         * to the next line without moving cursor to the next
  953.                         * line
  954.  
  955.        splitline        * adds a blank line without moving cursor to next line
  956.  
  957.        delline          * deletes the current line, with the blank line
  958.                         * becoming the current line (cursor position not
  959.                         * changed)
  960.  
  961.        joinline         * joins the next line (which contains our "saved" text)
  962.                         * to the current line at the cursor position
  963.  
  964.  
  965.  
  966.   The SemWare Editor Junior also has three more commands to allow a macro to
  967.   conditionally or unconditionally stop execution.  These commands,
  968.   "MacroQuitTrue", "MacroQuitFalse", and "MacroQuit", can be used to
  969.   simplify many macros as in the above example:
  970.  
  971.           f10     begin:
  972.                      CursorLeft
  973.                      MacroQuitFalse
  974.                      DelCh
  975.                      Jump begin:
  976.  
  977.   In the new version, the "jump to the end of the macro" is replaced with
  978.   the MacroQuitFalse command which will halt the macro if the previous
  979.   command result is FALSE.
  980.  
  981.  
  982. Advanced Macro Commands:
  983. ─────────────────────────────────────────────────────────────────────────────
  984.  
  985.   The following commands, intended primarily for macro writers, are designed
  986.   to simplify the writing of certain kinds of macros.  This group of macro
  987.   commands forces the indicated mode or setting.  If the setting is already
  988.   in that condition, they set the editor's result code to TRUE; otherwise,
  989.   they set it to FALSE.
  990.  
  991.   In some cases, a macro can behave differently based on the currently set
  992.   editor modes.  The following three commands give some control in
  993.   establishing the proper environment so that your macro will always work as
  994.   intended.
  995.  
  996.   SetInsMode - Sets Insert mode ON.  To set Insert mode OFF (that is, set
  997.       overwrite mode ON), do the following:  SetInsMode ToggleInsert
  998.  
  999.   SetAutoIndentMode - Sets AutoIndent mode ON.  To set AutoIndent mode OFF,
  1000.       do the following:  SetAutoIndentMode ToggleIndent
  1001.  
  1002.   SetWordWrapMode - Sets WordWrap mode ON.  To set WordWrap mode OFF, do
  1003.       the following:  SetWordWrapMode ToggleWordWrap
  1004.  
  1005.   The Find command sounds a tone when the search string cannot be found.
  1006.   This can be irritating in the case of a long-running macro that may
  1007.   possibly execute hundreds of finds that fail.  The following commands
  1008.   allow you to selectively turn the sound ON and OFF.
  1009.  
  1010.   SetSoundOn - Sets sound ON.
  1011.  
  1012.   SetSoundOff - Sets sound OFF.
  1013.  
  1014.   Most macros execute dozens of TSE Jr. commands, sometimes hundreds of
  1015.   times. This can cause the screen to flash rapidly as the macro runs. Not
  1016.   only is this disconcerting to watch, it actually decreases the speed of
  1017.   some macros. The following commands allow you to temporarily suspend or
  1018.   resume screen updating, while a macro is running.
  1019.  
  1020.   SetScreenOn - Turns screen updating ON.
  1021.  
  1022.   SetScreenOff - Turns screen updating OFF. You must turn screen updating
  1023.       back ON before your macro prompts for input, or if there is some
  1024.       output from the macro that you want displayed on the screen.
  1025.  
  1026.   NOTE: The editor will AUTOMATICALLY turn screen updating back ON when the
  1027.   macro has finished executing. Thus, it is not necessary to issue the
  1028.   SetScreenOn command at the end of the macro.
  1029.  
  1030.   Many times, it would be nice for a macro to force a few settings, do its
  1031.   assigned task, and then restore the original settings. The following
  1032.   commands allow you to do just that. Note that each time SaveSettings is
  1033.   executed, the previous settings saved with SaveSettings are overwritten.
  1034.  
  1035.   SaveSettings - Saves the current settings of:  Insert, AutoIndent,
  1036.       WordWrap, Sound, and Screen Updating.
  1037.  
  1038.   RestoreSettings - Restores the saved settings listed above.
  1039.  
  1040.   The following commands set the editor's result code to TRUE or FALSE based
  1041.   on the condition being tested. These commands make certain types of macro
  1042.   tests easier and more reliable.
  1043.  
  1044.   isBegLine - Returns TRUE if the cursor is at column 1; otherwise, FALSE is
  1045.       returned.
  1046.  
  1047.   isEndLine - Returns TRUE if the cursor is past the last non-white
  1048.       character on the current line; otherwise, FALSE is returned, including
  1049.       the case when the cursor is on an empty line.
  1050.  
  1051.   isEmptyLine - Returns TRUE if the current line is empty or contains only
  1052.       white space; otherwise, FALSE is returned.
  1053.  
  1054.   isLastLine - Returns TRUE if the cursor is on the last line of the
  1055.       currently edited file; otherwise, FALSE is returned.
  1056.  
  1057.   isFirstLine - Returns TRUE if the cursor is on the first line of the
  1058.       currently edited file; otherwise, FALSE is returned.
  1059.  
  1060.   isCursorInBlock - Returns TRUE if the cursor is inside a marked block;
  1061.       otherwise, FALSE is returned.
  1062.  
  1063.   To demonstrate how these concepts tie together, consider the following
  1064.   simple macro to delete all the blank lines in a marked block. The cursor
  1065.   should be at the beginning of the block when the macro is invoked.
  1066.  
  1067.   ^f9       SetScreenOff                    * turn OFF screen for speed
  1068.      begin: isCursorInBlock MacroQuitFalse  * exit if not in block
  1069.             isEmptyLine jFalse next         * skip if not empty line
  1070.             isLastLine  jTrue  last         * special handling for last line
  1071.             DelLine     jump   begin        * delete empty lines, and loop
  1072.      next:  CursorDown  MacroQuitFalse      * try next line
  1073.             Jump begin
  1074.      last:  DelLine                         * delete the last line
  1075.  
  1076.  
  1077. Replacing a CR with a CR/LF
  1078. ─────────────────────────────────────────────────────────────────────────────
  1079.  
  1080.   Have you ever loaded a file and gotten the message "long lines split"?
  1081.   Have you ever had a database file that just had a carriage return at the
  1082.   end of each line of text?  We have developed a small macro that allows you
  1083.   to replace a visible carriage return (CR) with a carriage return/linefeed
  1084.   (CR/LF).
  1085.  
  1086.   The DOS standard specifies that a CR/LF be appended to each line of text
  1087.   in an ASCII text file.  Some databases, as well as the Macintosh, only use
  1088.   carriage returns at the end of their lines of text in files.  The
  1089.   following macro can be used when you see the carriage return (it will
  1090.   appear as a musical note) in your text.  The macro will replace the
  1091.   carriage return (ASCII 13) with a carriage return/linefeed (ASCII 13/10).
  1092.  
  1093.   <key>     SetScreenOff                * turn OFF screen updating
  1094.             Find #13 Return 'i' Return  * find a carriage-return
  1095.             MacroQuitFalse              * halt if none found
  1096.        top: DelCh                       * delete the carriage-return
  1097.             SplitLine                   * split the line at that point
  1098.             CursorDown                  * move down to the next line
  1099.             JoinLine                    * join the next line to current line
  1100.             BegLine                     * move back to beginning of line
  1101.             RepeatFind JTrue top        * repeat if another carriage-return found
  1102.  
  1103.   NOTE: <key> is the key to which you should tie this macro.  Once you have
  1104.         added the macro to your keyboard, run QCONFIG.EXE to install the
  1105.         changes. To use QCONFIG.EXE, run it, press <Enter> to accept Q.EXE,
  1106.         press <K> for keys, press <Enter> to accept QCONFIG.DAT, then press
  1107.         <S> to save your changes.
  1108.  
  1109.  
  1110. Eliminating all tabs in your file
  1111. ─────────────────────────────────────────────────────────────────────────────
  1112.  
  1113.   Have you ever wanted to get rid of ALL the tabs (ASCII 9) that are in your
  1114.   text file?  It gets pretty frustrating trying to figure out how to do
  1115.   this, right?  The SemWare Technical Support Staff is often asked how to
  1116.   resolve this problem.  You can use the following command to do this.
  1117.  
  1118.   TabsToSpaces        <Esc><O><X>
  1119.   ------------------------------------------------------------
  1120.   Expands tab characters to the appropriate number of spaces. Tabs within
  1121.   quotes (single and double) are not expanded.  If the cursor is within a
  1122.   marked Block when this command is executed, only tabs within the Block are
  1123.   expanded; otherwise, this command operates on the entire file.
  1124.  
  1125.  
  1126. Drawing Boxes in Text
  1127. ─────────────────────────────────────────────────────────────────────────────
  1128.  
  1129.   Have you ever wanted to box in parts of a text file for emphasis, or to
  1130.   spice up messages with fancy boxes?  We have developed a simple one-key
  1131.   step for boxing in your text with the editor.
  1132.  
  1133.   The editor has a versatile line/box-drawing capability. But since most of
  1134.   us like to make text editing as simple as possible, we took the editor's
  1135.   box-drawing feature and incorporated it into two different versions of a
  1136.   macro.  Each version takes a column block, marked word, or character block
  1137.   that the user marks and draws a box around the text.  Then, depending on
  1138.   which version is used, it reinserts the boxed text into your file in one
  1139.   of two ways: "insert" or "overwrite."
  1140.  
  1141.   Give one of the versions of the macro a try and see how it gives your text
  1142.   files an exciting new look!
  1143.  
  1144.   This version of the macro will box the text and re-insert it WITHOUT
  1145.   overwriting other text in the file.
  1146.  
  1147.   <key>   SetScreenOff EditFile "nul" Return Quit GotoBlockEnd AddLine
  1148.           GotoBlockBeg InsertLine Cut EditFile Return GotoColumn '2' Return
  1149.           Paste InsertLine GotoBlockEnd ToggleBoxDraw upagainr: CursorUp
  1150.           JTrue upagainr leftagaint: CursorLeft JTrue leftagaint
  1151.           GotoBlockEnd CursorDown leftagainb: CursorLeft JTrue leftagainb
  1152.           upagainl: CursorUp JTrue upagainl CursorRight ToggleBoxDraw
  1153.           UnMarkBlock BegFile MarkColumn EndFile EndLine CursorLeft Copy Quit
  1154.           Paste UnMarkBlock
  1155.  
  1156.   This version of the macro will box the text and re-insert it into the file
  1157.   while overwriting text surrounding the block with the new box.
  1158.  
  1159.   <key>   SetScreenOff EditFile "nul" Return Quit GotoBlockBeg Cut Paste
  1160.           FillBlock " " Return CursorUp CursorLeft EditFile Return
  1161.           GotoColumn '2' Return Paste InsertLine GotoBlockEnd ToggleBoxDraw
  1162.           upagainr: CursorUp JTrue upagainr leftagaint: CursorLeft
  1163.           JTrue leftagaint GotoBlockEnd CursorDown leftagainb: CursorLeft
  1164.           JTrue leftagainb upagainl: CursorUp JTrue upagainl CursorRight
  1165.           ToggleBoxDraw UnMarkBlock BegFile MarkColumn EndFile EndLine
  1166.           CursorLeft Cut Quit PasteOver UnMarkBlock
  1167.  
  1168.   NOTE: <key> is the key to which you should tie each macro.
  1169.  
  1170.       Once you have added the macro to your QCONFIG.DAT file, run
  1171.       QCONFIG.EXE to install the changes. To use QCONFIG.EXE, run it, press
  1172.       <Enter> to accept Q.EXE, press <K> for keys, press <Enter> to accept
  1173.       QCONFIG.DAT, then press <S> to save your changes.
  1174.  
  1175.  
  1176. Loading a Filelist into The SemWare Editor Junior
  1177. ─────────────────────────────────────────────────────────────────────────────
  1178.  
  1179.   Do you often work with the same group of files?  Does it take you awhile
  1180.   to load these files?  If so, you are like many others who use the same
  1181.   files quite often and who spend a lot of time loading them into the
  1182.   editor.  Now you can use the flexibility of the editor to load ALL those
  1183.   files with a single keystroke.
  1184.  
  1185.   To use the following macro to load your list of files, first create a
  1186.   file (that is, FILELIST).  Then list each one of the files you need to
  1187.   load (including its path) on separate lines.  Finally, save that file
  1188.   for future use (note that you may have several lists of files for
  1189.   different needs).  In the future you can just load your filelist into
  1190.   the editor and run the macro. Notice that since you have not actually
  1191.   viewed the files yet, they will not be loaded until you move to them
  1192.   the first time . This will permit the user to take care of any "Press
  1193.   Escape" prompts.
  1194.  
  1195.   The end result will be to load each of the files in the filelist into the
  1196.   editor in the order that they were listed and to remove the FILELIST from
  1197.   the current file ring.
  1198.  
  1199.   <key>         SetScreenOff            * turn OFF screen updating
  1200.                 EndFile                 * go to end of FILELIST file
  1201.         repeat: UnMarkBlock             * make sure no block is marked
  1202.                 MarkLine                * mark the current line
  1203.                 Copy                    * copy it to the scrap buffer
  1204.                     * the following line will place the name of the file just
  1205.                     * copied to the scrap buffer, in the file ring immediately
  1206.                     * following the LISTFILE.  Doing this repeatedly in reverse
  1207.                     * order will place the file in the ring in the desired
  1208.                     * order while remaining in the FILELIST file.
  1209.                 EditFile CurrentFilename " " Paste Return
  1210.                 CursorUp JTrue repeat   * repeat while we can cursor up
  1211.                 Quit                    * Quit the FILELIST file
  1212.                 NextFile                * move to the first file in the ring
  1213.  
  1214.   NOTE: <key> is the key to which you should tie this macro. Once you have
  1215.       added the macro to your QCONFIG.DAT file, run QCONFIG.EXE to install
  1216.       the changes. To use QCONFIG.EXE, run it, press <Enter> to accept
  1217.       Q.EXE, press <K> for keys, press <Enter> to accept QCONFIG.DAT, then
  1218.       press <S> to save your changes.
  1219.  
  1220.  
  1221. Macro Table is Full
  1222. ─────────────────────────────────────────────────────────────────────────────
  1223.  
  1224.   Are you running out of macro space in the editor?  Does the editor respond
  1225.   with a MACRO TABLE FULL error when installing your keys?  Then it looks
  1226.   like you need more space for editor macros.  Although the configuration
  1227.   area for key definitions is fixed in the editor, there still is a
  1228.   solution. Setting up external macro files are a good way to add macros to
  1229.   the editor when the macro table is full.
  1230.  
  1231.   The configuration area for key definitions holds approximately 2000 bytes
  1232.   of information.  When that space is full, you will receive an error
  1233.   message: 'macro table full at line #:'.  One solution is to go into your
  1234.   keyboard definition file (normally QCONFIG.DAT) and delete macros that are
  1235.   no longer needed. Alternatively you can move several of your larger macros
  1236.   to an external macro file and compile it with QMAC, TSE Jr.'s external
  1237.   macro compiler.  Each of these external macro files can be up to 4k in
  1238.   size and you can generate as many such files as needed. Thus, users have
  1239.   access to an unlimited amount of macro space through the use of external
  1240.   macro files.
  1241.  
  1242.   For example, create a macro file named MYMACS.MAC that has several of your
  1243.   larger macros included in it.  Next create a batch file, such as Q.BAT, to
  1244.   run the editor, and load your macros. To eliminate confusion about where
  1245.   you execute Q.BAT, rename Q.EXE to TSEJR.EXE.  The batch file will then be
  1246.   similar to the following:
  1247.  
  1248.        tsejr %1 %2 %3 %4 %5 %6 %7 %8 %9 -lmymacs.mac
  1249.  
  1250.   The batch file loads TSE Jr., loads up to nine files on the command line,
  1251.   and loads the external macro file.  Modifications to the 'mymacs.mac'
  1252.   section of the batch file may be needed, depending on the name of your
  1253.   macro file and its location on your system.
  1254.  
  1255.   The end result is a keyboard definition file with more space available,
  1256.   plus an easy way to load the deleted macros in an external macro file.
  1257.   All this with still just the touch of one keystroke!
  1258.  
  1259.  
  1260. Printing to LPT1 and LPT2
  1261. ─────────────────────────────────────────────────────────────────────────────
  1262.  
  1263.   Have you ever wanted to print to another printer port in the editor?  Do
  1264.   you have two printers and want to toggle between them?
  1265.  
  1266.   As shipped, the editor's printer routines output all data to PRN, which
  1267.   usually points to LPT1.  A number of users have expressed a need to print
  1268.   to LPT2, or to toggle between LPT1 and LPT2.  In response, you can select
  1269.   the device to print to, PRN, LPT1, LPT2, LPT3, or even a disk file.
  1270.  
  1271.   This printer output device can be set permanently via QCONFIG, or
  1272.   temporarily inside the editor via the Print pull-down menu.
  1273.  
  1274.  
  1275. Inserting Text at the same column
  1276. ─────────────────────────────────
  1277.  
  1278.   Sometimes you may want to add a word, or phrase, at the same location on
  1279.   more than one line in a file.  It is possible to do this with some help
  1280.   from the FillBlock command.
  1281.  
  1282.   Let us assume that you want to insert the word "number" before each number
  1283.   in the following text:
  1284.  
  1285.   this is line 1
  1286.   this is line 2
  1287.   this is line 3
  1288.   this is line 4
  1289.   this is line 5
  1290.   this is line 6
  1291.  
  1292.   First use the MarkColumn command <ALT K> to mark the single column of
  1293.   numbers, so that we have a one column wide block that spans the six lines.
  1294.   Move the cursor to "1" and issue the CopyBlock command <ALT C> so that we
  1295.   have:
  1296.  
  1297.   this is line 11
  1298.   this is line 22
  1299.   this is line 33
  1300.   this is line 44
  1301.   this is line 55
  1302.   this is line 66
  1303.  
  1304.                ^
  1305.                |--- This single column is marked.
  1306.  
  1307.   Issue the FillBlock command <CTRL KL>. Specify the character to "fill" the
  1308.   block and then press <Enter>.  Let's assume we specified "." to fill the
  1309.   block.  We now have:
  1310.  
  1311.   this is line .1
  1312.   this is line .2
  1313.   this is line .3
  1314.   this is line .4
  1315.   this is line .5
  1316.   this is line .6
  1317.  
  1318.                ^
  1319.                |--- This single column is marked.
  1320.  
  1321.   Issue the FindReplace command <CTRL QA>.  Specify "." in the "Search for:"
  1322.   prompt and press <Enter>.  Specify "number " (note the trailing space) in
  1323.   the "Replace with:" prompt and press <Enter>.  Specify "LGN" in the
  1324.   "Options" prompt and press <Enter>.  "L" causes the operation to be
  1325.   limited to the marked block, "G" causes the operation to start at the
  1326.   beginning of the marked block, and "N" will cause all changes to be made
  1327.   with "no prompting" to the user.  We now have:
  1328.  
  1329.   this is line number 1
  1330.   this is line number 2
  1331.   this is line number 3
  1332.   this is line number 4
  1333.   this is line number 5
  1334.   this is line number 6
  1335.  
  1336.                ^
  1337.                |--- This single column is still marked, so just
  1338.                     issue the UnmarkBlock command <ALT U>.
  1339.  
  1340.  
  1341.