proc main integer nTries = 3 ; This is the login prompt and timeout values string szLogin = "ogin: " integer nLoginTimeout = 3 ; This is the password prompt and timeout values string szPW = "assword: " integer nPWTimeout = 3 ; This is the prompt once your password is verified string szPrompt = ">" string szConnect = "ppp^M" ; Set this to FALSE if you don't want to get an IP address boolean bUseSlip = TRUE delay 2 transmit "^M^M" ; Attempt to login at most 'nTries' times while 0 < nTries do ; Wait for the login prompt before entering ; the user ID, timeout after x seconds waitfor szLogin then DoLogin until nLoginTimeout TryAgain: transmit "^M" ; ping nTries = nTries - 1 endwhile goto BailOut DoLogin: ; Enter user ID transmit $USERID, raw transmit "^M" ; Wait for the password prompt waitfor szPW until nPWTimeout ; Send the password transmit $PASSWORD, raw transmit "^M" ; Send term type waitfor "nknown" transmit "vt100" transmit "^M" ; Wait for the prompt waitfor szPrompt transmit szConnect goto Done BailOut: set screen keyboard on halt Done: endproc