; My auto connect script to slip into CMU ; Author: Michael Hemy ; Date: Sep 22, 1996 ; ; ; Note1: password and login were hardcoded because ; the dialog box does not always remember even ; if I tell it to. ; ; Note2: This version is cmu-safe. It can handle ; garbage/passwords being thrown at the modem ; ; Note3: If I am still not connected after 3 tries ; then I drop into manual mode. ; ; Note4: To make this script work replace the following with actual values: ; my_login_name ; my_password ; my_machine_name ; proc main integer nTries = 3 GetUsername: while 0 < nTries do waitfor "Username:" ,matchcase then SetUsername until 3 transmit "^M" nTries = nTries - 1 endwhile goto BailOut SetUsername: transmit "my_login_name^M" GetPassword: waitfor "Password:" ,matchcase then SetPassword until 10 transmit "^M" goto GetUsername SetPassword: transmit "my_password^M" waitfor "TS" ,matchcase then SetSLIP until 5 transmit "^M" goto GetUsername SetSLIP: transmit "slip my_machine_name ^M" waitfor "Password:" ,matchcase then DoPassword until 15 goto BailOut DoPassword: transmit "my_password" goto Done BailOut: ; Something isn't responding. Halt the script ; and let the user handle it manually. set screen keyboard on halt Done: endproc