Dial-Up Autoconnect Script for Bilkent Dial-up Services

Copy and paste the following script lines and save them as a text file named
"bilkent.scp". Then point to this script file in the "Scripting" dialog in the
"Properties" window of your dial-up connection icon.

 

;*******************************************************************************
; For 2531 series lines, do not forget to append "@bcc" or "@fen" etc.
; to the username.
; For 2850 and 200 series lines, do not forget to append ".bcc" to the username.
; 
; By: Ekrem Yadigar, April 2000

proc main
        integer nTries = 3
        string szLogin = "Username:"
        integer nLoginTimeout = 6
        string szPW = "assword:"
        integer nPWTimeout = 6
        string LAST = "Entering PPP mode"
        string szConnect = "ppp^M"
        boolean bUseSlip = FALSE
        transmit "^M"
        while 0 < nTries do
                waitfor szLogin then DoLogin
                        until nLoginTimeout
TryAgain:
                transmit "^M"
        endwhile
        goto BailOut
DoLogin:
        transmit $USERID, raw
        transmit "^M"
        waitfor szPW until nPWTimeout
        if FALSE == $SUCCESS then
                goto TryAgain
        endif
        transmit $PASSWORD, raw
        transmit "^M"
        transmit "5^M"
        waitfor LAST until nPWtimeout
        if FALSE == $SUCCESS then
                goto TryAgain
        endif
        transmit szConnect
        if bUseSlip then
                set ipaddr getip 2
        endif
        goto Done
BailOut:
        set screen keyboard on
        halt
Done:
endproc
;*********************************