Re: ANNOUNCE: Script Debugger 2 mailing list
Re: ANNOUNCE: Script Debugger 2 mailing list
- Subject: Re: ANNOUNCE: Script Debugger 2 mailing list
- From: Allen Watson <email@hidden>
- Date: Mon, 27 Nov 2000 12:10:15 -0800
On or near 11/24/00 2:56 AM, Bill Cheeseman at email@hidden observed:
>
So far, the only invasive part was the signup page. I de-checked all the
>
spam invitations, and so far I have received no spam that I could identify
>
as coming from eGroups, directly or indirectly. I elected to receive
>
messages via e-mail instead of going to the web site to read them, and it
>
now appears to operate like any other mailing list.
I've been a member of four or five groups hosted on Egroups. They operate
pretty much like any list. Some lists may contain 4-line ads at the top if
the owner or members are not willing to pay a minor fee ($5-10 a month, I
believe). That gets to be annoying, but any of us scripters should be able
to write a script that will strip out those ads, as I have done for all my
egroups mailing lists. This should work for any message sent from an Egroups
list if you use MS Entourage; adapt for your E-mail client:
(* Note that all lines should end with "--"; if a line does not so end,
append the following line to it to reconstruct long lines.
*)
tell application "Microsoft Entourage" --
set currentMessages to the current messages --
repeat with aMsg in currentMessages --
my ProcessMsg(aMsg) --
end repeat --
end tell --
--
on ProcessMsg(theMsg) --
tell application "Microsoft Entourage" --
-- activate--
if class of theMsg is incoming message then--
set t to (the content of theMsg)--
set p to the paragraphs of t--
set newText to ""--
set {match1, match2, changed} to {false, false, false}--
repeat with aline in p--
if (not match1) and (my matchLine(aline, "-", "egroups
sponsor", ">") or ,--
(my matchLine(aline, "=-=-", "=-=-", "=-="))) then--
set match1 to true--
set match2 to false--
set changed to true--
else--
if match1 and (my matchLine(aline, "-", "", ">") or ,--
my matchLine(aline, "=-=-", "=-=-", "=-=")) then--
-- beep--
if aline starts with "-" then--
set endPoint to (offset of aline in t) + (count
aline) + 1--
else if aline starts with "=-=-" then--
set endPoint to (offset of aline in t) -- Finds
first marker line--
set endPoint to (offset of aline in (text
(endPoint + 1) thru -1 of t)) ,--
+ (count aline) + 1 -- Finds second--
end if--
set theRest to text endPoint thru -1 of t--
set newText to newText & theRest--
exit repeat--
else--
if (not match1) or match2 then set newText to
newText & aline & return--
end if--
end if--
end repeat--
if changed then set the content of theMsg to newText--
-- if changed then display dialog newText--
else--
display dialog subject of theMsg & " was skipped; not
incoming"--
end if--
end tell --
end ProcessMsg --
--
on matchLine(aline, s, c, e) -- Starts with, contains, ends with--
if (aline starts with s) and (aline contains c) and (aline ends with e)
then--
return true--
else--
return false--
end if--
end matchLine--
--
--
Peace be with you!
Allen <email@hidden> XNS Name: =Allen Watson
My web page: <
http://home.earthlink.net/~allenwatson/>
Scripts for OE and Entourage: <
http://homepage.mac.com/allenwatson/>