home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 3
/
PDCD_3.iso
/
pocketbk
/
comms
/
read45a
/
SCRIPTS.ZIP
/
READALL.SCR
< prev
next >
Wrap
Text File
|
1995-04-24
|
23KB
|
956 lines
NEXISTS "m:\cix\file.swt" GOTO nofile
MENU "Choose File Option" (
"Download File" GOTO dftag
"Upload File" GOTO uftag
"Download Binmail" GOTO dmtag
"Upload Binmail" GOTO umtag
"No File Action" GOTO nofile)
nofile:
INFO "CIX Logon"
SETUP (
Stop=1 :
Parity=none :
Fail=None :
Timeout=20 :
Echo=off :
Data=8 )
EXISTS "m:\cix\rhsc_opt.001" GOTO T001
EXISTS "m:\cix\rhsc_opt.002" GOTO T002
EXISTS "m:\cix\rhsc_opt.003" GOTO T003
GOTO misrate
T001::
SETUP (BAUD=2400)
INFO "Baud Rate set to 2400"
WAIT 3
GOTO misrate
T002::
SETUP (BAUD=9600)
INFO "Baud Rate set to 9600"
WAIT 3
GOTO misrate
T003::
SETUP (BAUD=19200)
INFO "Baud Rate set to 19200"
WAIT 3
misrate::
EXISTS "m:\cix\rhsc_opt.004" GOTO T004
EXISTS "m:\cix\rhsc_opt.005" GOTO T005
EXISTS "m:\cix\rhsc_opt.006" GOTO T006
GOTO misshake
T004::
SETUP (HANDSHAKE=rtscts,xonxoff)
INFO "Handshaking set to Both"
GOTO misshake
T005::
SETUP (HANDSHAKE=rtscts)
INFO "Handshaking set to RTSCTS"
GOTO misshake
T006::
SETUP (HANDSHAKE=xonxoff)
INFO "Handshaking set to XonXoff"
misshake::
ON send fail goto bad
SET c1=4
rAlive:
SEND "<initialise>"
WAIT 20 ( ON reply "OK<$d><$a>" GOTO alive )
ON c1 GOTO rAlive
GOTO merror
alive:
SET C1=9
GOTO reDial
wait100:
INFO "Waiting to redial"
WAIT 10
reDial:
SEND "<prefix><CixNumber>"
WAIT 120 (
ON reply "CONNECT" GOTO letsgo
ON reply "NO DIALTONE" GOTO tele
ON reply "NO CARRIER" GOTO nocar
ON reply "ERROR" GOTO black
ON reply "BUSY" GOTO again )
GOTO merror
again:
ON c1 GOTO wait100
ALERT "Line busy" : EXIT
letsGo:
INFO "CONNECTED..."
SENDWAIT 160 "<$d>";,"login:" GOTO noLog
SENDWAIT 160 "qix<$d>";,"new user)" GOTO noUser
SENDWAIT 130 "<CixUserName>","Password:" GOTO noPass
SEND "<CixPassword>"
tryAgain:
WAIT 100 (
ON REPLY "Main:" GOTO gotMain
ON REPLY "More" GOTO gotMore )
ALERT "SOMETHING STRANGE"
gotMain:
EXISTS "m:\cix\rhsc_opt.010" GOTO Y01
SEND "OPTION DOWNLOAD C Q"
GOTO misy01
y01::
SEND "OPTION DOWNLOAD Y Q"
misy01::
SEND "OPTION UPLOAD C Q"
SEND "OPTION SCRATCHNAME cix.txt QUIT"
SEND "OPTION REFERENCE YES QUIT"
SEND "Q"
NEXISTS "loc::m:\cix\reply.txt" GOTO noup
INFO "Starting Upload"
WAIT 5
SEND "UPLOAD"
WAIT 10
TRANSMIT "loc::m:\cix\reply.txt","XM1K"
WAIT 5
SEND "SCPUT SCRIPT"
WAIT 5
INFO "Running Script"
SEND "SCRIPT"
noup:
WAIT 5
INFO "Getting Mail"
SEND "MAIL"
WAIT 50 (ON REPLY "Mail:" goto mcont)
mcont:
SEND "File All"
retry1:
WAIT 100 (ON REPLY "Mail:" GOTO read
ON REPLY "ail:" GOTO read)
GOTO retry1
read:
SEND "q"
WAIT 50 (ON REPLY "Main:" GOTO file)
file:
SEND "File read all"
retry2:
WAIT 100 (ON REPLY "Main:" GOTO cont
ON REPLY "ain:" GOTO cont)
GOTO retry2
cont:
INFO "Starting Download"
SEND "Down"
WAIT 5
EXISTS "m:\cix\rhsc_opt.007" GOTO T007
EXISTS "m:\cix\rhsc_opt.008" GOTO T008
EXISTS "m:\cix\rhsc_opt.009" GOTO T009
T007::
EXISTS "m:\cix\rhsc_opt.010" GOTO Y02
RECEIVE "a:\cix\cix.txt","XM1K"
GOTO missdown
y02::
RECEIVE "a:\cix\cix.txt","YM1K"
GOTO missdown
T008::
EXISTS "m:\cix\rhsc_opt.010" GOTO Y03
RECEIVE "m:\cix\cix.txt","XM1K"
GOTO missdown
y03::
RECEIVE "m:\cix\cix.txt","YM1K"
GOTO missdown
T009::
EXISTS "m:\cix\rhsc_opt.010" GOTO Y04
RECEIVE "b:\cix\cix.txt","XM1K"
GOTO missdown
y04::
RECEIVE "b:\cix\cix.txt","YM1K"
missdown::
WAIT 50 (ON REPLY "Main:" GOTO swoff
ON REPLY "y/n" GOTO yorn)
INFO "Problem! Disconecting"
swoff:
INFO "Sending LOGOFF"
SENDWAIT 20 "BYE","y/n" GOTO cont1
SEND "Y"
cont1:
INFO "Hanging UP!!"
HANGUP
INFO "Finished"
EXIT
gotMore:
WAIT 1
SEND "n"
GOTO tryAgain
yorn:
SEND "Y<$d>"
GOTO swoff
dftag:
QUERY "File Download" (
"Conference:",s2
"Topic:",s3
"File to Download:",s4
"To (Path and Name):",s5)
INFO "CIX Logon"
SETUP (
Stop=1 :
Parity=none :
Fail=None :
Timeout=20 :
Echo=off :
Data=8 )
EXISTS "m:\cix\rhsc_opt.001" GOTO T1001
EXISTS "m:\cix\rhsc_opt.002" GOTO T1002
EXISTS "m:\cix\rhsc_opt.003" GOTO T1003
GOTO misrate1
T1001::
SETUP (BAUD=2400)
INFO "Baud Rate set to 2400"
WAIT 3
GOTO misrate1
T1002::
SETUP (BAUD=9600)
INFO "Baud Rate set to 9600"
WAIT 3
GOTO misrate1
T1003::
SETUP (BAUD=19200)
INFO "Baud Rate set to 19200"
WAIT 3
misrate1::
EXISTS "m:\cix\rhsc_opt.004" GOTO T1004
EXISTS "m:\cix\rhsc_opt.005" GOTO T1005
EXISTS "m:\cix\rhsc_opt.006" GOTO T1006
GOTO misshake1
T1004::
SETUP (HANDSHAKE=rtscts,xonxoff)
INFO "Handshaking set to Both"
GOTO misshake1
T1005::
SETUP (HANDSHAKE=rtscts)
INFO "Handshaking set to RTSCTS"
GOTO misshake1
T1006::
SETUP (HANDSHAKE=xonxoff)
INFO "Handshaking set to XonXoff"
misshake1::
ON send fail goto bad
SET c1=4
dfrAlive:
SEND "<initialise>"
WAIT 20 ( ON reply "OK<$d><$a>" GOTO dfalive )
ON c1 GOTO dfrAlive
GOTO merror
dfalive:
SET C1=9
GOTO dfreDial
dfwait100:
INFO "Waiting to redial"
WAIT 10
dfreDial:
SEND "<prefix><CixNumber>"
WAIT 120 (
ON reply "CONNECT" GOTO dfletsgo
ON reply "NO DIALTONE" GOTO tele
ON reply "NO CARRIER" GOTO nocar
ON reply "ERROR" GOTO black
ON reply "BUSY" GOTO dfagain )
GOTO merror
dfagain:
ON c1 GOTO dfwait100
ALERT "Line busy" : EXIT
dfletsGo:
INFO "CONNECTED..."
SENDWAIT 160 "<$d>";,"login:" GOTO noLog
SENDWAIT 160 "qix<$d>";,"new user)" GOTO noUser
SENDWAIT 130 "<CixUserName>","Password:" GOTO noPass
SEND "<CixPassword>"
dftryAgain:
WAIT 100 (
ON REPLY "Main:" GOTO dfgotMain
ON REPLY "More" GOTO dfgotMore )
ALERT "SOMETHING STRANGE"
dfgotMain:
EXISTS "m:\cix\rhsc_opt.010" GOTO Y20
SEND "OPTION DOWNLOAD C Q"
GOTO misy20
y20::
SEND "OPTION DOWNLOAD Y Q"
misy20::
SEND "OPTION UPLOAD C Q"
SEND "OPTION SCRATCHNAME cix.txt QUIT"
SEND "OPTION REFERENCE YES QUIT"
SEND "Q"
NEXISTS "loc::m:\cix\reply.txt" GOTO noup1
INFO "Starting Upload"
SEND "UPLOAD"
WAIT 5
TRANSMIT "loc::m:\cix\reply.txt","XM1K"
SEND "SCPUT SCRIPT"
WAIT 5
INFO "Running Script"
SEND "SCRIPT"
noup1:
WAIT 5
INFO "Getting Mail"
SEND "MAIL"
WAIT 50 (ON REPLY "Mail:" goto dfmcont)
dfmcont:
SEND "File All"
dfretry1:
WAIT 100 (ON REPLY "Mail:" GOTO dfread
ON REPLY "ail:" GOTO dfread)
GOTO dfretry1
dfread:
SEND "q"
WAIT 50 (ON REPLY "Main:" GOTO dffile)
dffile:
SEND "File read all"
dfretry2:
WAIT 100 (ON REPLY "Main:" GOTO dfcont
ON REPLY "ain:" GOTO dfcont)
GOTO dfretry2
dfcont:
INFO "Starting Download"
SEND "Down"
WAIT 5
EXISTS "m:\cix\rhsc_opt.007" GOTO T1007
EXISTS "m:\cix\rhsc_opt.008" GOTO T1008
EXISTS "m:\cix\rhsc_opt.009" GOTO T1009
T1007::
EXISTS "m:\cix\rhsc_opt.010" GOTO Y05
RECEIVE "a:\cix\cix.txt","XM1K"
GOTO missdown1
y05::
RECEIVE "a:\cix\cix.txt","YM1K"
GOTO missdown1
T1008::
EXISTS "m:\cix\rhsc_opt.010" GOTO Y06
RECEIVE "m:\cix\cix.txt","XM1K"
GOTO missdown1
y06::
RECEIVE "m:\cix\cix.txt","YM1K"
GOTO missdown1
T1009::
EXISTS "m:\cix\rhsc_opt.010" GOTO Y07
RECEIVE "b:\cix\cix.txt","XM1K"
GOTO missdown1
y07::
RECEIVE "b:\cix\cix.txt","YM1K"
missdown1::
WAIT 50 (ON REPLY "Main:" GOTO dfswoff
ON REPLY "y/n" GOTO dfyorn)
INFO "Problem! Disconecting"
GOTO dfnofile2
dfswoff:
SEND "OPTION DOWNLOAD C Q"
NEXISTS "m:\cix\file.swt" GOTO dfnofile2
S