home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 3 Comm
/
03-Comm.zip
/
protk1.zip
/
QUEENSVM.SCR
< prev
next >
Wrap
Text File
|
1994-05-21
|
3KB
|
127 lines
;-------------------------------------------------------------------------------
; File: QueensVM.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
; Queen's University VM via the PACX data switch...
;
;-------------------------------------------------------------------------------
s="vm" ; service
n="T 555 5555" ; phone number
u="userid" ; userid
p="passwd" ; password
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 "%s^M"
timeout 20
print "Wait for Connected"
wait "Connected to"
if r==0 then "Abort"
timeout 3
x=0
:GetTType
send "^M"
print "Wait for terminal type"
wait "terminal type"
if r==1 then "GotTType"
x=x+1
if x<5 then "GetTType"
:GotTType
timeout 20
send "ibmpc^M"
print "Wait for Q Screen"
wait "COMMAND"
if r==0 then "Abort"
send "^L"
timeout 5
x=0
:GetCPRead
send "^M"
print "Wait for CP READ"
wait "CP READ"
if r==1 then "GotCPRead"
x=x+1
if x<5 then "GetCPRead"
goto "Abort"
:GotCPRead
print "Sending USERID"
send "L %u^M"
timeout 20
print "Waiting for PASSWORD"
wait "PASSWORD"
if r==0 then "Abort"
print "Sending PASSWORD"
send "%p^M"
print "Sending Screen Refresh"
send "\x1BH2"
print "Success!"
return
:Abort
print "Hanging up..."
send "+++~+++~+++ath^M"
print "Attempt aborted!"
abort
;-------------------------------------------------------------------------------
; End of CompServ.SCR
;-------------------------------------------------------------------------------