home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 8
/
FreshFishVol8-CD1.bin
/
new
/
comm
/
mail
/
thor
/
thor.lha
/
rexx
/
NCommPoll.thor
< prev
next >
Wrap
Text File
|
1994-08-06
|
2KB
|
110 lines
/* NCommPoll.thor · by Troels Walsted Hansen
** $VER: NCommPoll.thor v1.22 (04.04.94)
**
** An ARexx script that automates NComm dialing of:
** 1) BBSs you select from a list of all BBSs defined in Thor.
** 2) All BBSs with events.
** 3) All BBSs.
**
** IMPORTANT: To use this script, the BBSs configured in Thor must
** have the same name as those in your NComm phonebook.
*/
options results
DO_NOT_ASK = 0
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)
/* Determine what user wants.. */
dialstring = ""
THORTOFRONT
if(DO_NOT_ASK = 0) then REQUESTNOTIFY TEXT '"Dial which?"' BT '"_Select|_Events|_All|_Cancel"'
else result = 1
/* Cancel */
if(result = 0) then exit
/* Select */
if(result = 1) then do
THORTOFRONT
do forever
REQUESTLIST BBSLIST
if(rc ~= 0) then break
else BBSName = result
dialstring = dialstring || "|" || BBSName
end
end
/* Events */
if(result = 2) then do
address command("thor:bin/listevents short >t:ThorBBSs")
open(file, "t:ThorBBSs")
do until(eof(file))
str = strip(delstr(readln(file), 23), T)
dialstring = dialstring || "|" || substr(str, 6)
end
close(file)
end
/* All */
if(result = 3) then do
GETBBSLIST STEM bbslist
do i=1 to BBSLIST.COUNT
dialstring = dialstring || "|" || BBSLIST.i
end
end
if(dialstring = "") then do
if(exists("T:ThorBBSs")) then address command "delete >nil: T:ThorBBSs"
exit
end
/* Is NComm already running? If not, start it... */
if ~show('p', 'ncomm') then do
if ~exists("t:NCommStartupScript") then do
call open(nscript, "t:NCommStartupScript", W)
call writeln(nscript, "stack 10000")
call writeln(nscript, "cd NComm:")
call writeln(nscript, "run <>nil: NComm")
call close(nscript)
end
address command
"execute t:NCommStartupScript"
"WaitForPort ncomm"
if(rc) then exit
end
address 'ncomm'
NCOMMTOFRONT
DIAL strip(dialstring, B, "|")
/* Cleanup and exit... */
if(exists("T:ThorBBSs")) then address command "delete >nil: T:ThorBBSs"
exit