Written by Nigel Stanger <nigel.stanger@stonebow.otago.ac.nz>
What does it do?
If you are on several mailing lists, it’s often very handy to receive them in digest mode, especially if you are on a (relatively) high volume list like MACSCRPT. Much better to get seven messages a day rather than over fifty!
Anyway, a nice way to read these digests is with Easy View, which understands the digest format and displays each message as a separate topic. Unfortunately, replying to a message from Easy View is more than a little trivial. There is an external for Easy View which does some of the work, but you still have to copy and paste the message body manually. Until I wrote this script, I tended not to reply to mailing list messages because of the effort involved (as you may have guessed, I'm lazy ;).
The latest version of Easy View is somewhat scriptable, so I decided to write a script which handles all the legwork of creating a reply in Eudora, leaving me to do the creative bit!
Thus, about came the existence of EVER. This script takes the currently selected message in Easy View, copies it, parses it to extract the headers and body, then creates a message in Eudora. On the way it also quotes the body text for you. All you have to do then is decide whether you want to reply to the original sender or to the list, and which bits of the body you want to keep.
None of these are included with the script, but I’ve included URLs and Info-mac directory paths above so you can find copies of them. If you feel adventurous, you could modify the script to use (or not use) different applications and additions, but see the legal section below.
How do I use it?
Installation
EVER is supplied as both a compiled script and a script application. If you have a script menu extension (e.g., OSA Menu) you can use the compiled script (“EVER.script”) — see 1 below. If you don’t have one of these extensions, or you have problems using “EVER.script”, you should use the script application (“EVER.app”) — see 2 below.
1 — Installing under OSA Menu (or similar)
Launch Easy View, select Open “Easy View scripts” Folder… from OSA Menu, and drop “EVER.script” or an alias to it into this folder. (You can rename “EVER.script” to anything you like, incidentally.) Next, and very importantly, you must open the OSA Menu preferences and set Run scripts: to Very Compatible. You will also need to install the OSA Runner application that comes with OSA Menu. You have to run in very compatible mode, otherwise Easy View doesn’t realise that the clipboard has changed, and everything falls apart (EVER still runs, it just doesn't do what it’s supposed to).
There are several other script menu extensions out there, but I haven’t tested any of them, so I don’t know whether EVER will work with them or not. If you manage to get EVER to work with a different script menu extension, please let me know how you did it, and I’ll include it in the documentation.
2 — Installing the script application
Alternatively, you can just use the script application. This is useful if you use a Launcher-like utility. I’ve actually done this myself. (Personally, I would prefer to install it under OSA Menu, but for some unknown reason I can’t get OSA Runner to work at all on my machine — I theorise demonic possession.)
To install, just take “EVER.app” and put it, or an alias to it, wherever is appropriate for your setup. If you’re using a Launcher-type utility, you can install it into that as you would any other application. Again, you can rename “EVER.app” to whatever you like.
3 — General notes
The first time you run EVER, it will check for the required scripting additions and ask you to find all the required applications. If a scripting addition is missing, EVER will tell you so and quit. EVER will not, however, tell you if one of the required applications is not installed. This may be implemented one day, just not yet…
Use
Once you have installed EVER, it’s simply a matter of selecting the message you want to reply to in Easy View, then running the script. EVER will extract the headers and body, quote the body, add a preamble line and create a message in Eudora. As an added convenience, I’ve included a progress bar so you can see how fast (or slow) the process is going.
The message created in Eudora will initially be addressed to the original sender (in the From: line of the original message). If you want to reply to the list instead, you’ll have to do that yourself — it doesn’t appear possible to extract the list name from Easy View (as far as I can tell, it isn’t there in any place that can be accessed from AppleScript, though I’m willing to be proven wrong). EVER selects the To: line for you as a convenience.
Configuration
There are only really two things you can configure easily: the reply prefix (defaults to “Re:”) and the quoting string (defaults to “>”). These are stored in the properties ReplyPrefix and QuoteString, respectively. If you’re feeling adventurous, you could fiddle with the regular expressions, but the only reason you’d want to do that would be if you had a digest with a different format (not that likely I think).
If you want to change the preamble line (“On xxx, yyy wrote:”) you’ll have to hack the code in ProcessBody(). Similarly, if you want to change which applications EVER uses, or get rid of the progress bar, you’ll have to hack it yourself. Again, see the legal section below.
Troubleshooting
• I get told there isn’t enough memory.
This is probably Progress Bar that’s complaining. By default it only has a 64K memory partition, which isn’t a lot, really. If you try to reply to a particularly big message, Progress Bar will run out of memory when it tries to get the clipboard contents. Increase Progress Bar’s memory partition a bit.
• When I try to open the script with the Script Editor, I get told “File not found” (or words to that effect).
At a guess, there’s something wrong with your AppleScript installation. I had the exact same problem on my test machine until I reinstalled AppleScript. Installing AppleScript manually by dragging the apporpriate extensions into the System Folder seems to work OK, but appears to cause this error in the right circumstances. Reinstalling AppleScript using a proper installer seems to solve the problem.
• OSA Runner crashes on my machine.
I have no idea what the problem is here — the exact same thing happens to me. One possible theory which I haven’t tested yet is that this only happens on Power Macs. I’ve been in contact with Leonard Rosenthol (author of OSA Menu), and he doesn’t have any ideas at present either. The workaround is to use the script application.
Acknowledgements
Thanks to Gregory Charles Rivers for helping me with a couple of sticky problems, and Dan Hinckley for pointing me at his scripts which do much the same thing (I borrowed the idea of using tokenize from here — this sped up execution times by a factor of 2 or 3!); Jon Pugh and Leonard Rosenthol for help with my OSA Menu problems (albeit unsuccessful to date); and John Baxter, Wayne Walrath, Martin Fenner and Dave Winer for suggesting various ways of handling message quoting. I may implement some of those ideas yet!
Version History
1.2
• 19 October 1995
• If a message’s header lines didn’t get matched by the regular expressions, EVER
fell over completely. Fixed. (Thanks to Paul Suh for pointing this out.)
• Added code to check whether the headers are actually there or not, and behave
gracefully if any of them are missing.
• Updated the URLs for gaea to point to the new site.
• Added comments about OSA Runner crashing to the Troubleshooting section.
1.1.1
• 28 September 1995
• Found out that the reason I was having problems transporting the script onto
my test machine was that AppleScript wasn’t installed properly on it. Doh!
• Now includes both a compiled script and a script application.
• Added URLs for the various bits to the documentation and rewrote the docs
again…
1.1
• 22 September 1995
• Now checks for the required osaxen.
• Broke the code up into subroutines to make it a little clearer.
• Added lots of comments!
• Fixed some minor errors in the readme.
• Distributed as a script application.
1.0
• 13 September 1995
• First public release.
In the future
• I hope to improve the body quoting at some stage — at present it uses the rather unintelligent method of putting a quote character at the beginning of each line. If a line is very close to the wrapping length, this will cause a godawful mess :) This will probably have to wait a while though — I have real work to get on with!
• Make it a little less dependent on the particular applications and osaxen?
• More configurable (i.e., more properties)?
• Somewhat nicer configuration (perhaps by holding the option key when you run it).
• Find out whether it is actually possible to get the list name from Easy View (somehow I doubt it).
EVER is freeware. It may not be charged for, except for nominal duplication fees. Explicit permission is granted to distribute EVER on the Info-Mac, NautilusCD and Apprentice CD-ROMs, if they want to.
You may alter the source code of EVER to meet your specific needs or configuration, but any such modifications should be for personal use only. Please don’t distribute altered versions.
STRANGE Software Research makes no guarantees as to the stability of this script, and cannot be held responsible for any damage caused by it.
Various products mentioned above are copyright or trademarks of their respective owners.