home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 3 Comm
/
03-Comm.zip
/
protk1.zip
/
COMPSERV.SCR
next >
Wrap
Text File
|
1994-05-21
|
3KB
|
131 lines
;-------------------------------------------------------------------------------
; File: CompServ.SCR
;
; Auth: Brian Fisher
; RR 1 Seeley's Bay
; Ontario, Canada
; KOH 2NO
;
; Date: May 18 1994
;
; Purp: Example of the ProTalk Script Language, used to log on to
; CompuServ through the Queen's University PACX/DataPac link.
;
;-------------------------------------------------------------------------------
u="77777,8888" ; userid
p="samplepasswd" ; password
s="CIS" ; service
d="FALSEPINNUMBER" ; PIN Number
n="T 555 5555" ; phone number
x=0
timeout 5
:checkAT ; see if modem responds
print "Checking modem..."
x=x+1
send "AT^M" ; send attention sequence
wait "OK" ; wait for OK to come back
if r==1 then "GotAT" ; got a response
if x<5 then "checkAT"
print "No response from MODEM"
abort
:GotAT
print "Modem is ALIVE"
; Dial the phone number
print "Dialing %n..."
timeout 120
send "ATD%n^M" ; send dialing string
print "Waiting for response,"
connect
print "Result=%r"
if r>3 then "Connected"
print "Connect attempt failed!"
goto "Abort"
:Connected
timeout 3
x=0
:SendCR
print "Looking for PACX Prompt,"
x=x+1
send "^M"
wait "Enter class"
if r==1 then "GotPACX"
if x<5 then "SendCR"
print "Failed to get PACX"
goto "Abort"
:GotPACX
send "datapac^M"
timeout 20
print "Wait for Connected"
wait "Connected to"
if r==0 then "Abort"
timeout 3
x=0
:GetDataPac
send "^M"
print "Looking for DATAPAC '*'"
wait "*"
if r==1 then "GotDataPac"
x=x+1
if x<10 then "GetDataPac"
goto "Abort"
:GotDataPac
timeout 10
send "%d^M"
print "Wait for Host Name:"
wait "Host Name:"
if r==0 then "Abort"
send "%s^M"
print "Wait for User ID:"
wait "User ID:"
if r==0 then "Abort"
send "%u^M"
print "Wait for Password:"
wait "Password:"
if r==0 then "Abort"
send "%p^M"
print "Wait for CompuServ"
wait "CompuServ"
if r==0 then "Abort"
print "Success!"
return
:Abort
print "Hanging up..."
timeout 5
x=0
:Abort1
send "+++"
wait "OK"
if r==1 then "Done"
x=x+1
if x<3 then "Abort1"
:Done
timeout 3
send "ath^M"
wait "OK"
abort
;-------------------------------------------------------------------------------
; End of CompServ.SCR
;-------------------------------------------------------------------------------