; This is a script for dialing in to the CSM 56K modems ; REMEMBER to turn off "bring up terminal after dialing" in the Modem ; properties under options. ; last updated Fall 1999 by Trevor Boyd and Jeff Cleary proc main ; First, I'll define the necessary variables integer nTries = 3 string szlogin = "login:" integer nLoginTimeout = 3 string szPW = "Password:" integer nPWTimeout = 3 string szconnect = "kato>" string nppp = "ppp" ; Now, the script begins, and waits for the "login:" prompt to start while 0 < nTries do waitfor "login:" then DoLogin until nLoginTimeout ; This is in case the "login:" prompt hasn't come up yet TryAgain: transmit "^M" nTries = nTries - 1 endwhile goto BailOut ; This sequence transmits all the necessary information to the server DoLogin: transmit $USERID, raw transmit "^M" waitfor szPW until nPWTimeout if FALSE == $SUCCESS then goto TryAgain endif transmit $PASSWORD, raw transmit "^M" waitfor szconnect transmit nppp transmit "^M" goto Done ; This is in case there are any problems, and the user can ; exit the program BailOut: set screen keyboard on halt Done: endproc