home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 2 BBS
/
02-BBS.zip
/
emis14p.zip
/
zocmt.scr
< prev
Wrap
Text File
|
1995-01-30
|
3KB
|
141 lines
# ZOC Script für MausTausch
#
# Setze die Parameter. Das Verzeichnis wird als Parameter übergeben.
seta emisdir "%lastline%"
writeln "%emisdir%"
openfile "%emisdir%\emismt.cfg" "r"
getfile ;# Überspringe die Programm-Id
getfile
seta bbs "%lastline%"
getfile
seta phone "%lastline%"
getfile
seta name "%lastline%"
getfile
seta pass "%lastline%"
closefile
# To test your own script, change the next line to 'debug 1'
debug 0
setn noexit 0
# Set a few values
setn waittime 30 ;# time between dials
setn maxtry 20 ;# max number of trys
seta init "" ; # Evtl zusätzlicher Modem-Init-String
#INIT-String vorhanden?
compa "%init%" WITH ""
ifnequ send "%init%"
ifnequ wait "OK"
ifequ send "^M"
delay
# Reset counter, clear screen
setn counter 1
cls
# MAIN LOOP
#
:loop0
# Dial and see what happens
# (if the number contains a ^I (TAB) the following text is used
# in the CALLING.LOG instead of logging just the phone number)
dial "%phone%^I%bbs%"
# Set timeout to 90sec. and wait for a line of text to come
timeout 90
:loop1
waitline
# if something arrived save incoming line to variable
# (lastline might change duringprocessing)
ifnbrk seta last "%lastline%"
# else
# if WAITLINE timed out, set our variable to TIMEOUT
ifbrk seta last "TIMEOUT"
# Set text compare to non exact matching (that is CONNECT=CONNECT 1200)
exact 0
# compare to for CONNECT or CARRIER and if equal, log in
compa "%last%" WITH CONNECT
ifequ goto login
compa "%last%" WITH CARRIER
ifequ goto login
# Try again for BUSY, NO CARRIER, NO DIALTONE
compa "%last%" WITH BUSY
ifequ goto SomeMore
compa "%last%" WITH "NO CARRIER"
ifequ goto SomeMore
compa "%last%" WITH "NO DIALTONE"
ifequ goto SomeMore
# for TIMEOUT hang up
compa "%last%" WITH "NO CARRIER"
ifequ hangup
# Ignore anything else (Zyxels say 'RINGING' or V42 say 'PROCOL xxx')
# and wait for something we know
goto loop1
# Increment counter and eventually try again
#
:SomeMore
# ... wait and see if we ...
delay %waittime%
# ... want to try again?
inc counter
compn %counter% with %maxtry%
iflow goto loop0
ifequ goto loop0
# No success after %maxtry% tries
goto fail
##################
# LOGIN #
##################
:login
# Make a bit noise
beep 1
writeln "^M^J^MConnection established!!"
timeout 30
# MausTausch Schnell-Login
wait "(J/N)"
send "MausTausch%name%^m%pass%^mz"
# 5 min maximal für das infile
timeout 300
wait "Protokoll startet"
upload z "%emisdir%\infile.zip"
# 30 min maximal für das packen des outfiles
timeout 1800
wait "Protokoll startet"
download z "%emisdir%"
timeout 10
wait "NO CARRIER"
compn "%noexit%" with 0
ifequ endzoc
exit
#
#
# FEHLER
:fail
writeln "ERROR"
compn "%noexit%" with 0
ifequ endzoc
exit