Barry
Fri Dec 26 11:35:06 CST 2003
> This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
--B_3155304993_18501159
Content-type: text/plain;
charset="US-ASCII"
Content-transfer-encoding: 7bit
On 25/12/03 4:08 pm, in article
15d04376.0312250808.4862550d@posting.google.com, "Greg" <ghumpy@rmit.edu.au>
wrote:
> Hello,
>
> I am looking for an AppleScript that I can call up as part of a rule
> to automatically remove a specific phrase from the subject line of
> incoming mail.
>
>
> greg
Try this. Assuming the marker is placed at the beginning of the subject line
it should work. If the marker is elsewhere, have a go a modifying it!
property subjectText : "===SPAM==="
tell application "Microsoft Entourage"
set theMess to item 1 of (get current messages)
set theSubject to subject of theMess
if theSubject begins with subjectText then
set the subject of theMess to text (length of subjectText) thru -1
of theSubject
end if
end tell
--
Barry Wainwright
Microsoft MVP (see
http://mvp.support.microsoft.com for details)
Seen the Entourage FAQ pages? - Check them out:
<
http://www.entourage.mvps.org/toc.html>
Please post responses to this newsgroup. If I ask you to contact me
off-list, remove '.INVALID' from email address before replying.
--B_3155304993_18501159
Content-type: text/html;
charset="US-ASCII"
Content-transfer-encoding: quoted-printable
<HTML>
<HEAD>
<TITLE>Re: Script to change subject</TITLE>
</HEAD>
<BODY>
<FONT FACE=3D"Verdana, Helvetica, Arial"><SPAN STYLE=3D'font-size:10.0px'>On 25=
/12/03 4:08 pm, in article 15d04376.0312250808.4862550d@posting.google.com, =
"Greg" <ghumpy@rmit.edu.au> wrote:<BR>
<BR>
<FONT COLOR=3D"#0000FF">> Hello,<BR>
> <BR>
> I am looking for an AppleScript that I can call up as part of a rule<B=
R>
> to automatically remove a specific phrase from the subject line of<BR>
> incoming mail.<BR>
> <BR>
> <BR>
> greg<BR>
</FONT><BR>
Try this. Assuming the marker is placed at the beginning of the subject lin=
e it should work. If the marker is elsewhere, have a go a modifying it!<BR>
<BR>
<BR>
property subjectText : "=3D=3D=3DSPAM=3D=3D=3D"<BR>
tell application "Microsoft Entourage"<BR>
set theMess to item 1 of (get current messages)<BR>
set theSubject to subject of theMess<BR>
if theSubject begins with subjectText then<BR>
set the subject of theMess =
to text (length of subjectText) thru -1 of theSubject<BR>
end if<BR>
end tell<BR>
-- <BR>
Barry Wainwright<BR>
Microsoft MVP (see <a href=3D"
http://mvp.support.microsoft.com">http://mvp.su=
pport.microsoft.com</a> for details)<BR>
Seen the Entourage FAQ pages? - Check them out:<BR>
<a href=3D"
http://www.entourage.mvps.org/toc.html"><http://www=
.entourage.mvps.org/toc.html></a><BR>
<BR>
Please post responses to this newsgroup. If I ask you to contact me off-lis=
t, remove '.INVALID' from email address before replying.<BR>
</SPAN></FONT>
</BODY>
</HTML>
--B_3155304993_18501159--