Description: This script will generate (un)subscribe e-mail for Ezmlm mailing lists
Requirement: Mac OS 10.2+, Eudora 5+
-- Script Start (* Script to add/remove subscriber to Ezmlm mailing list 2002-03-10 by Fredrik Jonsson <mailto(colon)fredrik(at)combonet(dot)se> home page <http://xdeb.org/wiki/AppleScript> *) property listname : "yourlistname" -- change to whatever you want property listdomain : "domain.tld" -- change to whatever you want property listpers : "«Dominant»" -- change to whatever you want -- tell application "Finder" -- activate set dlgReply to (display dialog ¬ "Vilken adress vill lägga till/ta bort som prenumernat på Combonets lista?" buttons {"Avbryt", "Ta bort", "Lägg till"} ¬ default button 3 default answer "") if button returned of dlgReply is "Avbryt" then return set subscriber to text returned of dlgReply set subscriber to my austauschen("@", "=", subscriber) if button returned of dlgReply is "Lägg till" then set commandAddress to listname & "-subscribe-" & subscriber & "@" & listdomain else set commandAddress to listname & "-unsubscribe-" & subscriber & "@" & listdomain end if tell application "Eudora" activate set thePers to a reference to personality listpers -- Create a new message in the out box make message at end of mailbox "out" -- Message 0 indicates the current message set personality of message 0 to thePers set field "to" of message 0 to commandAddress set signature of message 0 to none end tell -- end tell (* Saschas fast search/replace routine for AppleScript searching and replacing in a string. This routine is my very own invention. So if you use it in your own scripts (that's OK with me!), then I want you to credit me within the source of your AppleScript and within any Readme-Files and Documentation your AppleScripts may have. (Just keep this comment in your script.) See how I did with David Cortrights great "getSelectedMessages" Routine? This routine is approx. > 300 times faster than searching replacing by looping through all the characters in a string. Author: Sascha Welter <swelter@mus.ch> *) on austauschen(suchen, ersetzen, theString) -- Parameters: search, replace, the String set olddelis to my text item delimiters set my text item delimiters to (suchen) tell me to set theList to (every text item of theString) set my text item delimiters to (ersetzen) set theString to theList as string set my text item delimiters to olddelis return theString end austauschen -- Script Stop