home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 8
/
FreshFishVol8-CD1.bin
/
new
/
comm
/
mail
/
thor
/
thor.lha
/
rexx
/
CrossPost.thor
< prev
next >
Wrap
Text File
|
1994-08-06
|
3KB
|
95 lines
/* CrossPost.thor · by Troels Walsted Hansen
** $VER: CrossPost.thor v1.13 (19.03.94)
**
** An ARexx script that will allow you to post one message on
** infinitely many BBSs, in different conferences if you wish.
*/
options results
if(substr(address(),1,4) ~= "THOR") then do
parse arg portname
if~(show(p, portname)) then do
if ~(show(p, "THOR.01")) then do
say "No THOR port found!"
exit
end
else portname = "THOR.01"
end
end
else portname = address()
address(portname)
/* main stuff */
THORTOFRONT
GETGLOBALCONFIG
REQUESTFILE TITLE '"Select message file to crosspost:"' ID '"'GLOBALCONFIG.SAVEDIR'"' FP PAT '"#?"'
msgtopost = result
lastchar = right(msgtopost,1)
if(rc~=0|lastchar = "/"|lastchar = ":"|msgtopost = "") then do
REQUESTNOTIFY TEXT '"No file selected!"' BT '"_Ok"'
exit
end
posi = lastpos("/",msgtopost)
if(posi = 0) then posi = lastpos(":",msgtopost)
WithoutPath = substr(msgtopost,posi+1)
REQUESTSTRING TITLE '"Please enter subject of message:"' BT '"_Ok|_Cancel"' ID '"'WithoutPath'"' MAXCHARS 40
subject = result
if(rc ~= 0|subject = "") then exit
REQUESTSTRING TITLE '"Please enter receiver name:"' BT '"_Ok|_Cancel"' ID '"ALL"' MAXCHARS 40
receiver = result
if(rc ~= 0|receiver = "") then exit
REQUESTNOTIFY TEXT '"Do you wish to crosspost to BBSs from a list?"' BT '"_Yes|_No"'
if(result = 0) then do
do forever
REQUESTLIST BBSLIST
bbsname = result
if(rc ~= 0|bbsname = "") then break
REQUESTLIST CONFLIST BBS '"'bbsname'"'
confname = result
if(rc ~= 0) then break
ADDEVENT BBS '"'bbsname'"' EVENT ENTERMSG SENDTO '"'receiver'"' CONF '"'confname'"' MSGFILE '"'msgtopost'"' SUB '"'subject'"'
if(rc ~= 0) then REQUESTNOTIFY TEXT '"Failed to post this time, try again?"' BT '"_Yes|_No"'
if(result = 0) then break
PACKEVENTS '"'bbsname'"'
end
end
else if(result = 1) then do
REQUESTFILE TITLE '"Select CrossPost mailing list:"' ID '"THOR:Rexx/PostingLists"' FP
configfile = result
lastchar = right(configfile,1)
if(rc~=0|lastchar = "/"|lastchar = ":"|configfile = "") then exit
open(cf, configfile, R)
do forever
call readln(cf)
bbsname = substr(readln(cf),6)
confname = substr(readln(cf),7)
if(bbsname = ""|confname = "") then break
ADDEVENT BBS '"'bbsname'"' EVENT ENTERMSG SENDTO '"'receiver'"' CONF '"'confname'"' MSGFILE '"'msgtopost'"' SUB '"'subject'"'
if(rc ~= 0) then REQUESTNOTIFY TEXT '"'||'Failed to post at: '||bbsname'"' BT '"_Ok"'
else PACKEVENTS '"'bbsname'"'
end
close(cf)
end
exit