home *** CD-ROM | disk | FTP | other *** search
/ Current Shareware 1994 January / SHAR194.ISO / textedit / slmrhelp.zip / SLMRHELP.TXT < prev   
Text File  |  1993-09-30  |  7KB  |  153 lines

  1. /*************************************************************************/
  2. /* Text File  : SLMRHELP.TXT                                             */
  3. /* Programmer : Todd Fiske                                               */
  4. /*                                                                       */
  5. /* Purpose    : Brief documentation for SLMRHELP.MAC                     */
  6. /*                                                                       */
  7. /* Revision   : 09/30/1993 - first version                               */
  8. /* History                                                               */
  9. /*                                                                       */
  10. /* Language   : SAL 1.0 (Pre-Release)                                    */
  11. /*                                                                       */
  12. /*************************************************************************/
  13.  
  14. -- Overview
  15.  
  16. This is a set of macros to help in editing messages and replies in TSE when
  17. called from the Silly Little Mail Reader (SLMR) QWK packet reader.
  18. Actually, although primarily designed for use with SLMR, it may very well
  19. work with any QWK packet reader that uses an external editor, given minor
  20. alterations.
  21.  
  22.  
  23. -- Why SLMRHELP
  24.  
  25. When editing replies in TSE, SLMR will dump the entire message text into
  26. the editor. Invariably, the next several steps I have to take are:
  27.  
  28.    move to the end of the file
  29.    turn word wrap on
  30.    enter the salutation to the person to whom I'm replying
  31.  
  32. At this point, I can charge ahead with my reply, snipping little quotes out
  33. of the "parent" message, and generally typing furiously away. When I'm
  34. done, I have to delete the remainder of the parent message so it won't be
  35. sent as part of my reply. It eventually occured to me that TSE has macro
  36. "hooks" that could be used to automate these entry- and exit-processing
  37. tasks. SLMRHELP is the result.
  38.  
  39.  
  40. -- Contents and installation of this package
  41.  
  42. This package contains these files:
  43.  
  44.    SLMRHELP.MAC    compiled macros
  45.    SLMRHELP.S      SAL source code
  46.    SLMRHELP.TXT    this file
  47.  
  48. Put SLMRHELP.MAC in your TSE macro subdirectory (normally C:\TSE\MAC). Put
  49. the source code file in your TSE source subdirectory (normally C:\TSE\SRC).
  50. This file, SLMRHELP.TXT, can be read online in TSE or in a file viewer such
  51. as LIST, or you can print it by using the command:
  52.  
  53.    copy slmrhelp.txt lpt1
  54.  
  55. or whatever printer port is applicable for you. Finally, store the
  56. distribution archive in a safe place.
  57.  
  58. SLMRHELP.MAC should be kept in your TSE macro subdirectory so that TSE can
  59. find it no matter what other subdirectory or drive you may be in.
  60.  
  61.  
  62. -- Setting up SLMR to use SLMRHELP
  63.  
  64. SLMR lets you choose how to prepare the parent message for replying to in a
  65. number of different ways. It also gives you a few options for setting up
  66. your external editor. Here are the basic settings you need to use, or at
  67. least should take advantage of:
  68.  
  69.    1> send the full message
  70.    2> send the message header - this is *required* for SLMRHELP to take
  71.       action
  72.    3> quoting method is optional - I use "single"
  73.    4> set the editor string to include the full path and filename, and
  74.       include the "load macro" flag - for example, mine is:
  75.  
  76.       c:\tse\e.exe -lslmrhelp.mac
  77.  
  78.  
  79. To be honest, there are many other options available within SLMR, and I
  80. have not tried them all. I've simply settled on the few that do what I
  81. need. Should intrepidity prevail, I might explore some of the other
  82. options, but for now, I'm satisfied. On the other hand, if you know of any
  83. useful tricks, please pass them on, and by the same token, I will modify
  84. SLMRHELP to take advantage of anything I learn about.
  85.  
  86.  
  87. -- Notes on using SLMRHELP
  88.  
  89. By loading SLMRHELP.MAC on the command line with the -L switch, its
  90. operation is automatic. The entry processing is handled by a WhenLoaded()
  91. macro which TSE executes as soon as the macro file is loaded. If SLMRHELP
  92. determines that it is indeed in an SLMR reply file, it will hook the
  93. routine ExitProcess() to _ON_EXIT_CALLED_, so that when you use your normal
  94. save/exit key, ExitProcess() is called automatically to clean up the
  95. message.
  96.  
  97. The first thing that SLMRHELP actually does is to try to find the "From:"
  98. token in the message header. This has two purposes: a> to verify that we
  99. are indeed in an SLMR reply file and so continue processing, and b> to find
  100. the name of the person being replied to.
  101.  
  102. If the "From:" token is not found, SLMRHELP assumes that you aren't
  103. replying to a message, so it will bypass most of its entry processing. The
  104. only thing SLMRHELP will do in this case is to turn WordWrap on, and set
  105. the right margin to 79, assuming that you are either creating a new
  106. message, or editing a reply that you just wrote.
  107.  
  108. If the "From:" token is found, SLMRHELP assumes that you are replying to a
  109. message, and will perform the entry processing. Firstly, the senders name
  110. will be located and "properized" (in a relatively simplistic manner), and
  111. inserted into a simple salutation. Presently, the salutation will come out
  112. looking like this:
  113.  
  114.    "Hi Todd -"
  115.  
  116. If you want to use a different greeting, you'll need to edit and recompile
  117. the macro. At some point, I may try to make use of a settings file to
  118. handle this and other options, but for now, this is how it works.
  119.  
  120. SLMRHELP will add a "tear-line" to the end of the message you're replying
  121. to. This creates a visual barrier between the original message and your
  122. reply, but the main purpose is to allow SLMRHELP to delete the original
  123. message when you're through editing. During exit processing, SLMRHELP will
  124. search for the tear-line, and delete everything in the file up to and
  125. including that point. SLMRHELP will also delete the blank line directly
  126. after the tear-line, so don't type anything in that area.
  127.  
  128. Also, don't edit the tear-line itself, or else SLMRHELP will not be able to
  129. find it during exit processing, and the tear-line and the remainder of the
  130. original message will be returned as part of your reply. Of course, SLMR
  131. will let you go in and edit the reply again, just in case.
  132.  
  133. SLMRHELP also keeps track of what the primary message-editing buffer is
  134. when the program starts. This lets you load other files and be assured that
  135. the clean-up processes will only occur on your actual reply or new message.
  136.  
  137.  
  138. -- Wrapping it up
  139.  
  140. I have only tested this system under "normal" conditions, ie, I haven't
  141. gone out of my way to try to break it. I'm sure I could if I worked at it
  142. hard enough. Anyway, these macros should work well for you too, but please
  143. understand that you use them at your own risk.
  144.  
  145. If you have any questions or suggestions about the use of these macros,
  146. contact me via any of these services:
  147.  
  148.    SemWare BBS  TODD FISKE             mail : Todd Fiske
  149.    CompuServe   70451,1424                    P.O. Box 9715-244
  150.    Delphi       TFISKE                        Portland Maine 04104-2000
  151.  
  152. These files are placed into the public domain.
  153.