home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cardinal Internet Access Solutions
/
Cardinal_Internet_Access_Solutions(1996-08-19).iso
/
files
/
internet
/
slipnet
/
slipnet.z
/
CHICAGO.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-12-02
|
2KB
|
107 lines
#
# initialize modem
#
output atz\13
input 10 OK\n
#
# set modem to indicate DCD
#
#output at&c1
#input 10 OK\n
#
# send phone number
%tries = 0
%connect = 0
repeat
%tries = %tries +1
$result = "Initialize"
display "Try #:" %tries \r
# Edit the xxx-xxx-xxxx to be the access number assigned to you by slip.net
# *** ENTER PHONE NUMBER HERE***
output atdt9*,12177922777\13
#
%timeout = [read 45 $result]
%timeout = [read 45 $result]
# check if timed out
# this could be modem failure , or service
# took more than a minute to respond etc.
if %timeout = 0
display \n
display "ERROR Timed-out. Hangup line." \n
output +++\r
output ath0\r
%connect = 0
# abort
end
# Retries Expired
# Make this number as large as you want
if %tries = 50
display "VHT ( Very High Traffic)." \7\n
display "Trying some other time." \n
output +++\r
output ath0\r
display "Aborting." \n
abort
end
# Check if Modem Returns BUSY
# does not work with $result = "CONNECT" ??
# but since usually the only two conditions
# are busy and not busy , this will work
# NO CARRIER for example will pass through but
# will be traped in the wait 30 dcd command below
if $result = "BUSY"
# display "This number is Busy." \n
%connect = 0
display "Waiting for a while." \n
sleep 10
else
display "Trying to Connect."\7\n
%connect = 1
end
until %connect = 1
# now we are connected.
# # commented out next 2 lines - TED 11/05/94
#input 60 CONNECT
#display connected
#
# wait till it's safe to send because some modem's hang up
# if you transmit during the connection phase
#
wait 30 dcd
#
# wait for the username prompt
#
input 30 login:
#
# Edit user_name to be your slip login id assigned to you by slip.net
# (Be sure to put a 'S' first!)
# ***ENTER USERNAME HERE***
output Sxxxxxxxxxx\13
#
# and the password
#
input 30 Password:
#
# edit your_password to be your slip login password.
# ***ENTER PASSWORD HERE***
output xxxxxxxx\13
#
# we are now logged in
#
# wait for the address string
#
input 30 to
#
# parse address
#
address 30
#
# we are now connected, logged in and in slip mode.
#
display \n
display Connected. Your IP address is \i.\n
online