Anyone who subscribes to mail lists probably sees the ubiquitous [sewingcircle list] or other identifier inserted in the subject line of each and every e-mail that comes from the list bot.
Is there an existing script that parses for whatever you specify and strips it out?
How can this be done? I could be pretty proficient at AppleScript, if I had taken the time, but up 'til now, I haven’t. So be gentle when you describe the details, and I’ll gladly follow them and create this for everyone.
Thanks, Dave
There are 2 “subject” items which come into play here. One shows up in
the message when displayed in a mailbox and in the top of an open
message. The other is the subject field, which is preceded by “Subject:”
and shows up within the message.
Both can be changed by a script, but…
When the subject field within the message is changed, Eudora asks if
you want to save changes. The save command in Eudora’s dictionary only
applies to messages which are being composed. The other subject can
be changed without the save dialog popping up.
Here’s a script which changes only the subject which is displayed at the
top of the message window. You’ll need to modify it to suit your needs,
paying attention to the example and noticing that it includes a space after
the targeted words.
set targetWords to "[sewingcircle list] "
tell application "Eudora" to set subjectLine to subject of message 0 -- Message 0 is the front/selected message.
if subjectLine contains targetWords then
try
set oldTIDs to AppleScript's text item delimiters
set AppleScript's text item delimiters to targetWords
set fixedSubLine to every text item of subjectLine
set AppleScript's text item delimiters to oldTIDs
on error
set AppleScript's text item delimiters to oldTIDs
return -- Quit if there's an error.
end try
else
return -- Quit if it doesn't contain the target words.
end if
set fixedSubLine to fixedSubLine as text
tell application "Eudora"
set subject of message 0 to fixedSubLine
--set field "Subject" of message 0 to fixedSubLine -- This is the line which results in a save dialog.
end tell
Rob J