home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 35 Internet
/
35-Internet.zip
/
yatla1.zip
/
yatla.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1997-03-03
|
1KB
|
60 lines
/* YATLA/2 v1.1 (now with X-mailer) */
/* REXX tagline genarator for PmMail */
/* By Sam Herr */
call rxfuncadd 'sysloadfuncs', 'rexxutil', 'sysloadfuncs'
call sysloadfuncs
/* get message to add tagline to */
parse arg file
/* get the pmmail directory */
dir=directory()
parse var dir drv':'path
drv=drv':'
/* read in info from the .ini file */
/* close the .ini file */
tldrv=linein(yatla.ini)
tlpath=linein(yatla.ini)
mailer=linein(yatla.ini)
rc=lineout(yatla.ini)
/* go to the tagline dir */
'@'tldrv
'@cd' tlpath
/* randomly decide which tagfile to use */
rc=sysfiletree('*.tag',tags,O)
ran=random(1,tags.0)
tagfile=tags.ran
/* genirate a random number */
/* and close the tagline file */
num=linein(tagfile, 1, 1)
readpos=random(2,num)
rc=lineout(tagfile)
/* read in the random tagline */
tagline=linein(tagfile,readpos,1)
/* return to the pmmail dir */
'@'drv
'@cd' path
/* get the numer of lines in the file */
rc=linein(file,1,0)
return=1
x=0
do until return=0
return=lines(file)
xmail=linein(file)
x=x+1
/* if POS('X-Mailer:',xmail) >< 0 then rc=lineout(file,"X-Mailer: "mailer" ",x) */
end
/* put the tagline on the last line */
/* and close the file */
rc=lineout(file,tagline,x)
rc=lineout(file,,x+1)