proc main integer nTries = 3 string szLogin = "username:" integer nLoginTimeout = 3 string szPW = "password:" integer nPWTimeout = 3 string szPrompt = "annex:" ; This provider has a menu list like this: ; ; 1 : Our special GUI ; 2 : Establish slip connection ; 3 : Establish PPP connection ; 4 : Establish shell access ; 5 : Download our software ; 6 : Exit ; ; annex: ; string szConnect = "2^M" ; Set this to FALSE if you don't want to get an IP ; address boolean bUseSlip = TRUE delay 2 transmit "^M^M" while 0 < nTries do ; Wait for the login prompt before entering waitfor szLogin then DoLogin until nLoginTimeout TryAgain: transmit "^M" ; ping nTries = nTries - 1 endwhile goto BailOut DoLogin: transmit $IHRE_USERID, raw transmit "^M" waitfor szPW until nPWTimeout if FALSE == $SUCCESS then goto TryAgain endif transmit $IHR_PASSWORD, raw transmit "^M" ; Wait for the prompt waitfor szPrompt transmit szConnect if bUseSlip then ; An alternative to the following line is ; ; waitfor "Your address is " ; set ipaddr getip ; ; if we don't know the order of the IP addresses. set ipaddr getip 2 endif goto Done BailOut: set screen keyboard on halt Done: endproc