TIDs to the rescue again
TIDs to the rescue again
- Subject: TIDs to the rescue again
- From: Michelle Steiner <email@hidden>
- Date: Sat, 14 Apr 2001 18:54:46 -0700
Someone on the Emailer list wanted to know how to remove list names (in
the format [listname] from the subject of an email. Here's my partial
solution:
set tid to text item delimiters
tell application "Claris Emailer"
set the currentMessage to the displayed message of the front window
set the OldSubject to the subject of the currentMessage
end tell
set text item delimiters to "["
set the firstpart to the first text item of OldSubject
set text item delimiters to "]"
set the lastpart to the last text item of OldSubject
set the newSubject to the firstpart & the lastpart
set text item delimiters to tid
tell application "Claris Emailer"
set the subject of the currentMessage to the newSubject
end tell
It's a partial solution because it requires one pair of brackets; if
either or both are missing, it will not do what's expected. Also, it
will work only on an open message, and will not work on selected messages
of a browser window.
--Michelle
----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------