Personal Collections: Some Pictures and Some Little Mac Utilities
AppleScripts for Eudora
[ Main | Pictures | Macintosh Utilities | AppleScript for Eudora | Contact me / Kontakformular | About me ]

AppleScripts for Eudora

[Back to main Macintosh page.]

(Resource and code plug-ins are on a separate page.)

One application that has a reasonably good support for AppleScript is the email program Eudora. I've been using it for quite a while, starting with version 1.2 (when there was only one version, which was free); currently I use version 6.2.3 on OS X (the latest available version as of Jan 2006). Some of the scripts started as modification of other people's efforts (mainly John Delacour and Michael Schürig); I have tried to acknowledge the authors wherever it applies.

Note that most of these scripts are written only to work under Mac OS 9 or earlier; I've been converting some of them to OS X when I've needed them, but this happens at random times, and the pages on this site don't reflect these changes (yet). One day, I hope to update this page to contain only OS X compatible scripts...

As usual, all the scripts are free (which also applies to the original version when a script is based on other people's source). All the scripts are available here in pure text form; open the appropriate page in your browser, select all the text and copy it into a new window in Script Editor, the free editor for AppleScript that is installed on any new Macintosh.

Eudora 5 or later have a built-in 'Scripts' menu; for earlier versions (Eudora 3.1 to 4.x), which run under Mac OS 9 (and before), there are two easy way to run AppleScripts: use OSA Menu (see here for where to find it) and install scripts into the Finder folder that is specific to Eudora, or install the 'Scripts' plug-in by John Delacour. This plug-in is available at http://bd8.com/eudora/scripts/, where it can be found as

http://bd8.com/eudora/scripts/ascript_plugin_for_old_eu.hqx.

On John Delacour's site (http://bd8.com/eudora/), there are many other really useful Applescripts for Eudora. Have a look and try them.

 

1. Scripts for modifying text

Indent Selection

This is a simple script that will indent the currently selected lines in a message window by one tabulator. It does this by inserting a given number of spaces at the beginning of each selected line; the number is read from Eudora's settings. After running this script, the changed text is no longer selected.

Note that one should only select lines with a carriage return at the end for this script; soft-wrapped paragraphs are indented only on the first line, which might be handy but is usually not the desired result. Also note that this action cannot be undone! (But of course it would be easy to write a script that does the reverse, i.e. shifts the selected text to the left again.)

Wrap long lines as quoted text

This rewrap paragraphs that start with a quote character (the setting in Eudora's preferences is used) but were not wrapped, for example when quoting a set of long soft-wrapped paragraphs that were not word-wrapped by the original sender. The script needs the WrapText Scripting Addition by H. Iimori. See the information in the script for the download address.

Rewrap quoted text

This script rewraps consecutive paragraphs that start with a quote char but might have been cut into short lines when resent as quoted text. This script tries to rewrap those lines. Again, the WrapText is needed (see above).

Change text to bulleted list

This is a script that changes soft-wrapped text to a bulleted list. Each paragraph in the original text is converted into a wrapped indented list of lines, where the first line starts with a string like space-hyphen-space (this can be changed in the script code). The following lines are indented by the appropriate number of spaces. If the control key is pressed when the script opens, then empty lines will be inserted between each entry. The maximum length for a line is taken from Eudora's preference settings.

An example: the three lines (where the first might be wrapped at a different position depending on your message window width in Eudora)

the first point might continue like this on the following, i.e. the second
line; maybe add an empty line after each bulleted point?

and the second line

the third line, also the last here in this example

should be changed to:

- the first point might continue like this on the following, i.e.
  the second line; maybe add an empty line after each bulleted point?

- and the second line

- the third line, also the last here in this example

Change bulleted list to text

This is the reverse transformation, complementing the script above. It changes a bulleted list back to soft-wrapped paragraphs. This is handy if you want to change bulleted and indented (i.e. hard-wrapped) lines without adjusting line lengths manually; you would use this script to get soft-wrapped paragraphs, edit them as usual, then convert them back into a bulleted list using the script above.

2. Scripts for replying and checking mail

Reply to Author (From)

The original script is part of the Scripts plug-in package distributed by John Delacour. I copied various bits from a series of other scripts, mostly Michael Schürig's Reply to Digest script (1997, Public Domain).

The script simply creates a message as a reply directed to the author, i.e. the address in the "From" field. This might be useful if the message also contains a "Reply-To" line in the header, which is normally used for replies by Eudora. If the shift key is down, only the selected text is used in the body field of the reply, otherwise the whole text from the original message is inserted.

The script needs Kamprath Text Utilities osax, but it could be rewritten for any osax with a command to replace text.

Reply to selected email address

If you want e.g. reply to a message where the author puts this preferred email address in the signature, use this script. Select any text in the message, then run this script. It will create a new message with the selected text in the recipient field (the "To" field) and the contents of the original message quoted in the body text. If the control key is pressed, the body of the new message will be left empty.

The script needs the Scripting Addition "Jon's Commands".

Reply to digest - Author only

This script was written by Michael Schürig (© 1997, public domain). I have just added automatic modification of the personality for the reply message (only useful in Eudora Pro).

In a digest, many separate messages are merged into a single email. If you want to quote one of the original messages only, select the lines in the digest message you want to reply to including its headers (sender, subject and date). The "from:" field in the selected text is used for the address of the new message (i.e. a private reply to the author is created). Hold down the control key to include an attribution with date, time and author; otherwise only the author's address is used.

The required Scripting Additions are "Jon's Commands" by Jon Pugh, and Kamprath's Text Utilities" by Michael F. Kamprath. Both are freely available on the internet.

Reply to digest - List

Again, the original script was written by Michael Schürig (© 1997, public domain). I have added automatic modification of the personality for the reply message (only useful in Eudora Pro).

This is the same as above (Reply to digest - Author only), but it creates a reply for the list instead of the author of the selected message in the digest. In other words, it uses the listserver address of the digest message (the "reply-to" field if present, else the "from" field). The same Scripting Additions as above are needed.

Check Selected Personalities

The original is from the example scripts in John Delacour's Scripts plug-in package. I have changed it to use a global variable for saving the list of personalities which should be checked.

This script checks mail only for a selected subset of personalities. It will ask the user to select the set when the control key is pressed when the script runs. Otherwise (without the control key) it will check for new mail for the stored set of personalities. This script will only run with Eudora Pro (Eudora Light doesn't implement personalities).

Note: the Scripts plug-in for Eudora doesn't let scripts save changed global variables. Therefore this script will not work properly with the Scripts plug-in. There are two ways to work around this problem; one is to run in via the OSA Menu extension (or similar system extensions or control panels), the other is to use the following helper script that runs this script and saves its properties. For the second method to work, place this script in a subfolder named "Called Scripts"; this folder should be placed in the "Scripts" folder in the "Eudora Stuff" folder (see below).

The script needs the following Scripting Additions (both free): "Jon's Commands" (by Jon Pugh) and "Choose From List" (from the GTQ Library, by Gregory Quinn).

Check Selected Personalities helper script

This simple script can be used to run another script that contains global variables (properties).

Scripts started via the Eudora plug-in "Scripts" won't save their properties on exit; this is a workaround in the shape of a helper script that runs another script and saves properties if the control key was pressed. This is done for a particular situation where the script that is loaded and executed only needs its global variables saved if the control key was pressed. If you want the properties saved every time then simply remove the "if saveAtEnd then" condition at the end.

The path to the script to execute is built the following way. When run via the Scripts plug-in in Eudora, this script will get the path of the Eudora application as the result of the "path to me" command. It will look for the script to execute (it should be named "Check Selected Personalities") in the folder "Scripts:Called Scripts" which is in turn found within the "Eudora Stuff" folder. Put simply, we remove the application name from the path to Eudora, then add the string ":Eudora Stuff:Scripts:Called Scripts:Check Selected Personalities". This will be a complete path to the script file we want.

3. Miscellaneous scripts

Open in Netscape Navigator

This is a simple modification of a script by John Delacour. I have just added a few lines that determine the name of the start-up disk, therefore the script doesn't depend on the name of your disk any more (note that the script doesn't check if the start-up disk is locked or not...). It also finds Eudora and Netscape Nav./Comm. by their creator code.

From the documentation of the original version:

"If a message arrives with content-type set to text/html, Eudora Pro 3.1 (and perhaps Eudora Light 3.1?) will have an option under the "File" menu to "Open in Browser." If, however, the MIME type is not set to text/html, you will most likely see HTML in the body of the message. Or you may have to hit the "blah blah" button to see the HTML markup. But since the MIME type is not set to HTML, "Open in Browser" is not on. This script will copy the currently selected or open message and open it in Netscape. If the message has no HTML markup, it will display as plain text, and will look silly. (I.e. carriage returns don't display, etc.)"

Handler for x-eudora-setting

[Also available as a compiled script (BINHEX, StuffIt 4 archive).]

This AppleScript handles <x-eudora-setting:xxx=zzz> expressions in Eudora 3. In Eudora Pro 4, these are processed by Eudora itself and offer an easy and fast way for setting and changing preferences; in Eudora 3 (Pro and Light), this has to be done in another way (resource plug-ins, ResEdit, AppleScripts). This script offers a method similar to Eudora Pro 4's built-in mechanism for earlier versions of Eudora. Installed as a handler for these expressions, it will change the setting accordingly (after asking confirmation from the user).

Information on the installation process can be found in the first lines of the script.

As always, use at your own risk! This script can change any of the settings that are available in the preference panel of Eudora, including email address, account name and network settings.

Technical information: Eudora treats <x-eudora-setting:xxx=zzz> just like any other URLs; all the script has to do is have an handler for the standard GURL event, parse the parameters and tell Eudora to change the setting.

Open first unread message (link to main page)

Also available is a script that opens the first unread message of a mailbox. Since it runs best in conjunction with the macro utility OneClick, I submitted it to the archive site of the producer of OneClick. See the paragraph on my main Macintosh page.

Comments, corrections and suggestions are welcome (there's a feedback form).

 

Disclaimer:

Use the scripts on my page at your own risk! I'm not responsible for any damage or loss of data caused by these scripts. Since they all come with source code, feel free to change and improve them, but please don't distribute them without acknowledgement for the original code.

[Back to main Macintosh page.]