home *** CD-ROM | disk | FTP | other *** search
- # MCSNet Login.cmd Script for Trumpet Winsock
- #
- #trace on
- # set up some strings for dialing up MCS
- if ! [load $number]
- if [query $number "Enter MCS's dialup number"]
- save $number
- end
- end
- if ! [load $username]
- if [username "Enter you login username"]
- save $username
- end
- end
- if ! [load $password]
- if [password "Enter your login password"]
- save $password
- end
- end
- $modemsetup = "&c1&k3"
- #replace above with "&f1" if you get a Modem-Not-Responding-Message
- $prompt = ">"
- $userprompt = "login:"
- $passprompt = "Password:"
- $slipcmd = "slip"
- $addrtarg = "Your address is"
- $pppcmd = "ppp"
- %attempts = 10
- #-------------------------------------------------------------------
- # initialize modem
- output "atz"\13
- if ! [input 10 OK\n]
- display "Modem is not responding"\n
- abort
- end
- #
- # setup our modem commands
- #
- output "at"$modemsetup\13
- input 10 OK\n
- #
- # send phone number
- #
- %n = 0
- repeat
- if %n = %attempts
- display "Too many dial attempts"\n
- abort
- end
- output "atdt"$number\13
- %ok = [input 60 CONNECT]
- %n = %n + 1
- until %ok
- input 10 \n
- #
- # wait until it is safe to send because some modem's hang up if you transmit during
- # the connection phase
- #
- wait 30 dcd
- #
- # now prod the terminal server
- #
- output \13
- #
- # and the password
- #
- input 30 $passprompt
- output $password\13
- # jump into slip mode
- #
- output $slipcmd\13