home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 2002 July / APC0702D1.iso / isp / tpgi / HelpDesk / scripts / Qmosaic / TPGI_2100.mps next >
Encoding:
Text File  |  2000-09-24  |  1.7 KB  |  68 lines

  1. # TPGI PPP login script
  2. #
  3. # 21/Aug/95 EJW
  4. #
  5. # Modified to connect to TPG2100 - Experimental Release ONLY!
  6. #
  7. # 19/8/96 Rod Tunks  Release 0.1 Changed to wait for switching to ppp prompt
  8. #                                Added delay at the end of 3 second to allow 
  9. #                                Linux PPP to start so Qdeck wouldnt time out
  10. #
  11. # 19/8/96 Rod Tunks  Release 0.2 Changed wait to 2 seconds after ppp selected
  12. #
  13.      
  14. STRING username
  15. STRING password
  16. STRING framing
  17. STRING IPAddress
  18. #Trace on
  19. SetTimeOut  60
  20. CfgGetValue "Username" username
  21.      
  22. IF result = 0 THEN
  23.     GetInput "Enter your username:"  username 
  24.     IF result = 0 THEN
  25.         PRINT "Warning, no username entered."
  26.     ELSE
  27.         PRINT "Username set to: ";username 
  28.         CfgSetValue "Username" username
  29.     ENDIF
  30. ENDIF
  31.     
  32. CfgGetValue "Password" password
  33. IF result = 0 THEN
  34.     GetPassword "Enter your password:" password 
  35.     IF result = 0 THEN
  36.         PRINT "Warning, no password entered."
  37.     ENDIF
  38. ENDIF
  39.     
  40. CfgGetValue "Framing" framing
  41. IF result = 0 THEN
  42.     ABORT "Can't read 'Framing' setting from QDECK.INI."
  43. ENDIF                                                   # don't wait for spaces
  44.      
  45. CommWaitFor "username:"                 # case sensitive
  46.      
  47. CommSend        username
  48. CommSend        "%r"            # send ENTER 
  49.     
  50. CommWaitFor     "password:"
  51. CommSend        password
  52. CommSend        "%r"            # send ENTER 
  53.     
  54. CommWaitFor     "choice:"
  55.     
  56. # The Annex terminal server requires a macro to be exectued for connection 
  57. # ppp for PPP connection and slip for SLIP. It is case sensitive.
  58.      
  59. IF framing = "MPPPP" THEN
  60.     CommSend   "ppp"
  61. ENDIF
  62.     CommSend        "%r"
  63. CommWaitFor "PPP"
  64. Delay 2
  65.  
  66. END
  67.