home *** CD-ROM | disk | FTP | other *** search
- # Login.cmd for Snni/Exocom
- #
- # 1) You must use RTS/CTS
- # (also known as Hardware Flow Control or Hardware Handshaking)
- # 2) You must disable XON/OFF (Software Flow Control)
- # 3) For external modems: You must use a complete modem cable
- # ie: Pins 1,2,3,4,5,6,7,8 and 20 must be connected
- #
- # For additional information:
- # Email info@snni.net
- # or contact SNNI technical support: (714) 991-1919
- #**************************************************************************
- #
- # replace echo off with echo on to examine connection difficulties
- echo off
- #
- #
- %attempts = 20
- display \n
- #
- #
- if ![load $modemDefault]
- $modemDefault = "AT&F"
- save $modemDefault
- end
- #
- if ![load $modemSetup]
- $modemSetup = "AT&C1&D2"
- save $modemSetup
- end
- #
- if ![load $modemDialCmd]
- $modemDialCmd = "ATDT"
- save $modemDialCmd
- end
- #
- if ![load $number]
- display \7
- if [query $number "Enter SNNI Phone Number:"]
- if $number <> "Q"
- save $number
- end
- end
- end
- #
- if ![load $username]
- display \7
- if [username "Enter Your SNNI Username:"]
- if $username <> "Q"
- $username = lower($username)
- save $username
- end
- end
- end
- #
- if ![load $keepPassword]
- display \7
- if [query $keepPassword "Should I Remember Your Login Password? (Y or N)"]
- if $keepPassword <> "Q"
- if $keepPassword = "Yes"
- $keepPassword = "Y"
- end
- save $keepPassword
- end
- end
- end
- #
- if $keepPassword = "Y"
- if ![load $password]
- display \7
- if [password "Enter Your Login password:"]
- if $password <> "Q"
- save $password
- end
- end
- end
- else
- $password = ""
- save $password
- password "Enter Your Login Password:"
- end
- #
- #
- $userprompt = "login:"
- $passprompt = "password:"
- $addrtag = ") to "
- #
- #
- display \nThanks for choosing SNNI Internet Services!
- # reset modem
- set dtr off
- sleep 3
- set dtr on
- #
- display \nPress Esc to abort.
- display \n\nSetting Modem to Factory Defaults:
- output $modemDefault\13
- if ! [input 10 OK\n]
- display \n *** Modem is not responding. Examine your modem.
- display \n Examine modem port and speed settings (choose File | Setup).
- display \n Unable to establish connection.
- abort
- else
- display OK
- end
- #
- # Initialize modem
- #
- display \nInitializing Modem:
- output $modemSetup\13
- if ! [input 10 OK\n]
- display \n*** Modem initialization string $modemSetup failed.
- display \n Please examine your modem initialization command string.
- display \n Choose login | modem.cmd to correct.
- display \n Unable to establish connection.
- abort
- else
- display OK
- end
- #
- # Dial
- #
- echo on
- %n = 0
- repeat
- if %n = %attempts
- display \nRedial count exceeded.\n
- abort
- end
- if %n = 0
- display \nDialing SNNI Internet Services!
- end
- if %n > 0
- display \n\nRedialing SNNI Internet Services
- end
- output $modemDialCmd $number\13
- %ok = [input 55 CONNECT]
- %n = %n + 1
- until %ok
-
- echo off
- #Poke the Term Server
- output \13
-
- display \nSending user ID info to SNNI\n
- input 40 $userprompt
- output P$username\13
- input 40 $passprompt
- output $password\13
-
- #
- #
- display \nInitializing PPP Protocal\n
-
- sleep 3
-
- display \nReady to run Internet Applications. \n
- online
-