Eudora Reply-to Mk II
Eudora Reply-to Mk II
- Subject: Eudora Reply-to Mk II
- From: John Delacour <email@hidden>
- Date: Sun, 4 Aug 2002 22:41:13 +0100
Beware of the continuation characters
The script now catches more. I still need to split up runs of
multiple addresses, but the sort of messages that contain them are
not the sort of messages you normally reply to.
Run it from a toolbar button with a function key.
!! Eudora users. It occurs to me that some of you may not have a
Scripts menu, because someone at Qualcomm forgot where the scripts
folder belongs. Have you all got one?
tell application "Eudora"
try -- test that a valid incoming message is targeted
if outgoing of message "" then return
on error a
return "error a: " & a
end try
get whole text of message ""
end tell -- get the header lines
set s to item 1 of split(result, return & return)
set ls to split(s, return & space)
set s to join(ls, "")
set ls to split(s, return)
set ls2 to {}
repeat with l in ls
set s to "" & l
set goodkeys to {"From: ", "To: ", "Reply-To:"}
repeat with key in goodkeys
if s begins with "" & key then
set s to second text item of split(s, ":")
if s is not in ls2 and s contains "@" then set end of ls2 to s
end if
end repeat
end repeat
set ls to {}
repeat with i in ls2
set s to "" & i
repeat while s begins with space
set s to text 2 through -1 of s
end repeat
set end of ls to s
end repeat
set def to {" use mouse, up-arrow, cmd, shift, etc "}
set p to "Select one or more recipients"
(* one line .... items def.....*)
set ls to choose from list ls & def with prompt p default items ,
def with multiple selections allowed and empty selection allowed
(* end of line *)
if ls is def or ls is in {false, "", {}} then return ls
if item 1 of ls is in def then set ls to items 2 through -1 of ls
set toField to join(ls, ", ")
tell application "Eudora"
set mReply to reply message "" with everyone
set mReply's field "cc" to ""
set mReply's field "to" to toField
end tell
(* Handlers *)
on split(s, d)
set AppleScript's text item delimiters to {d}
set ls to text items of s
set AppleScript's text item delimiters to {""}
return ls
end split
on join(ls, d)
set AppleScript's text item delimiters to {d}
set s to "" & ls
set AppleScript's text item delimiters to {""}
return s
end join
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.