AmigaActive (541/1525)

From:Jon Barker
Date:8 Sep 2000 at 20:42:43
Subject:Re: Yam shortcuts.

Hello Gareth

On 08-Sep-00, you wrote:

> Hello Jon,

>> I'm using this neat REXX script I got from the YAM list to cut the
>> ad's from all Egroup lists. It's quite good, I've got it working on all
>> new mail, and then it filters the mails, :-)

> Fancy passing that on to this list? ;-) You don't even need to attach it,
> just paste it in as plain text ;-)

Here you go Gareth, it's by Roy Bartsch, I hope he doesn't mind me putting
it up here.

I've got it set up for "After getting new mail", and "turn off filter on new
mail" for my EGroups lists. Also Wait for termination is checked.

8<----------------------------------------------------------

/**********************************************************/
/* FixAds.yam version 1.01 */
/* (c)opyright 05-09-2000 <Roy_Bartsch@gmx.de> */
/* based on FixSeparator.yam version 4.0 */
/* (c)opyright 29-06-1999 <SnorsleX@SoftHome.net> */
/* */
/* snip off the nasty eGrops ads */
/* */
/* USAGE: */
/* 1. select this script in `config/ARexx/after download` */
/* 2. uncheck `on new mails` option in every filter */
/**********************************************************/

OPTIONS RESULTS
ADDRESS yam

setfolder 'Incoming' /* */
m=0
folderinfo stem postfach.
max=postfach.total
do for max
setmail m

R='0A'x
t=0
found=0

'MAILINFO STEM "MAILINF."'
File = MAILINF.FILENAME
changed=0;nr=0

call OPEN("in",File,"R")
do until EOF("in")
text=READCH("in",65000)
if text ~= "" then do
plats=POS("-------------------------- eGroups",text)
plats2=lastpos("-------_->",text)
if plats ~= 0 then do
nr=nr+1
mail.nr=Delstr(text,plats,plats2-plats+12)
changed=1
leave
end
else mail.nr = text
end
end
call CLOSE("in")

if changed = 1 then do
If t=0 then do
'SETMAIL 'i''
t=1
end
else 'LISTSELECT 'i''
call OPEN("out",File,"W")
x=0
do nr
x=x+1
call WRITECH("out",mail.x)
end
call CLOSE("out")
ADDRESS COMMAND 'protect 'File' -A'
end
m=m+1
end
mailfilter
exit 0

8<----------------------------------------------------------

Regards



----------------------------------------------------------------------------
Jon Barker
----------------------------------------------------------------------------

Quote carefully and read all ADMIN:README mails