/*************************************************************************/ /* Text File : SLMRHELP.TXT */ /* Programmer : Todd Fiske */ /* */ /* Purpose : Brief documentation for SLMRHELP.MAC */ /* */ /* Revision : 09/30/1993 - first version */ /* History */ /* */ /* Language : SAL 1.0 (Pre-Release) */ /* */ /*************************************************************************/ -- Overview This is a set of macros to help in editing messages and replies in TSE when called from the Silly Little Mail Reader (SLMR) QWK packet reader. Actually, although primarily designed for use with SLMR, it may very well work with any QWK packet reader that uses an external editor, given minor alterations. -- Why SLMRHELP When editing replies in TSE, SLMR will dump the entire message text into the editor. Invariably, the next several steps I have to take are: move to the end of the file turn word wrap on enter the salutation to the person to whom I'm replying At this point, I can charge ahead with my reply, snipping little quotes out of the "parent" message, and generally typing furiously away. When I'm done, I have to delete the remainder of the parent message so it won't be sent as part of my reply. It eventually occured to me that TSE has macro "hooks" that could be used to automate these entry- and exit-processing tasks. SLMRHELP is the result. -- Contents and installation of this package This package contains these files: SLMRHELP.MAC compiled macros SLMRHELP.S SAL source code SLMRHELP.TXT this file Put SLMRHELP.MAC in your TSE macro subdirectory (normally C:\TSE\MAC). Put the source code file in your TSE source subdirectory (normally C:\TSE\SRC). This file, SLMRHELP.TXT, can be read online in TSE or in a file viewer such as LIST, or you can print it by using the command: copy slmrhelp.txt lpt1 or whatever printer port is applicable for you. Finally, store the distribution archive in a safe place. SLMRHELP.MAC should be kept in your TSE macro subdirectory so that TSE can find it no matter what other subdirectory or drive you may be in. -- Setting up SLMR to use SLMRHELP SLMR lets you choose how to prepare the parent message for replying to in a number of different ways. It also gives you a few options for setting up your external editor. Here are the basic settings you need to use, or at least should take advantage of: 1> send the full message 2> send the message header - this is *required* for SLMRHELP to take action 3> quoting method is optional - I use "single" 4> set the editor string to include the full path and filename, and include the "load macro" flag - for example, mine is: c:\tse\e.exe -lslmrhelp.mac To be honest, there are many other options available within SLMR, and I have not tried them all. I've simply settled on the few that do what I need. Should intrepidity prevail, I might explore some of the other options, but for now, I'm satisfied. On the other hand, if you know of any useful tricks, please pass them on, and by the same token, I will modify SLMRHELP to take advantage of anything I learn about. -- Notes on using SLMRHELP By loading SLMRHELP.MAC on the command line with the -L switch, its operation is automatic. The entry processing is handled by a WhenLoaded() macro which TSE executes as soon as the macro file is loaded. If SLMRHELP determines that it is indeed in an SLMR reply file, it will hook the routine ExitProcess() to _ON_EXIT_CALLED_, so that when you use your normal save/exit key, ExitProcess() is called automatically to clean up the message. The first thing that SLMRHELP actually does is to try to find the "From:" token in the message header. This has two purposes: a> to verify that we are indeed in an SLMR reply file and so continue processing, and b> to find the name of the person being replied to. If the "From:" token is not found, SLMRHELP assumes that you aren't replying to a message, so it will bypass most of its entry processing. The only thing SLMRHELP will do in this case is to turn WordWrap on, and set the right margin to 79, assuming that you are either creating a new message, or editing a reply that you just wrote. If the "From:" token is found, SLMRHELP assumes that you are replying to a message, and will perform the entry processing. Firstly, the senders name will be located and "properized" (in a relatively simplistic manner), and inserted into a simple salutation. Presently, the salutation will come out looking like this: "Hi Todd -" If you want to use a different greeting, you'll need to edit and recompile the macro. At some point, I may try to make use of a settings file to handle this and other options, but for now, this is how it works. SLMRHELP will add a "tear-line" to the end of the message you're replying to. This creates a visual barrier between the original message and your reply, but the main purpose is to allow SLMRHELP to delete the original message when you're through editing. During exit processing, SLMRHELP will search for the tear-line, and delete everything in the file up to and including that point. SLMRHELP will also delete the blank line directly after the tear-line, so don't type anything in that area. Also, don't edit the tear-line itself, or else SLMRHELP will not be able to find it during exit processing, and the tear-line and the remainder of the original message will be returned as part of your reply. Of course, SLMR will let you go in and edit the reply again, just in case. SLMRHELP also keeps track of what the primary message-editing buffer is when the program starts. This lets you load other files and be assured that the clean-up processes will only occur on your actual reply or new message. -- Wrapping it up I have only tested this system under "normal" conditions, ie, I haven't gone out of my way to try to break it. I'm sure I could if I worked at it hard enough. Anyway, these macros should work well for you too, but please understand that you use them at your own risk. If you have any questions or suggestions about the use of these macros, contact me via any of these services: SemWare BBS TODD FISKE mail : Todd Fiske CompuServe 70451,1424 P.O. Box 9715-244 Delphi TFISKE Portland Maine 04104-2000 These files are placed into the public domain.