cript assumes you only need
   ; to issue one command to continue.  Feel free
   ; to add more commands if your provider requires
   ; it.

   ;
   ; 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 = "3^M"

   ; Set this to FALSE if you don't want to get an IP
   ; address

   boolean bUseSlip = FALSE

   
   ; -----------------------------------------------------


   ; Delay for 2 seconds first to make sure the
   ; host doesn't get confused when we send the
   ; two carriage-returns.

   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
   if FALSE == $SUCCESS then
      goto TryAgain
   endif

   ; Send the password

   transmit $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:
   ; Something isn't responding.  Halt the script
   ; and let the user handle it manually.

   set screen keyboard on
   halt

Done:

endproc


