home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / internet / net commander 1.0 / ISP / SCRPTLST / EXECPC.CMD < prev    next >
Encoding:
Text File  |  1996-02-16  |  1.3 KB  |  85 lines

  1. #    Executive-PC Login.cmd 
  2. #
  3. #trace on
  4. #
  5. # set up some strings for dialling up
  6. #
  7. if ![load $number]
  8.   if [query $number "Enter your Exec-PC phone number"]
  9.     save $number
  10.   end
  11. end
  12. if ![load $username]
  13.   if [username "Enter your Exec-PC PPP username"]
  14.     save $username
  15.   end
  16. end
  17. if ![load $password]
  18.   if [password "Enter your Exec-PC password"]
  19.     save $password
  20.   end
  21. end
  22. if ![load $init]
  23.   if [init "Enter an Initialization string"]
  24.     save $init
  25.   end
  26. end
  27. %attempts = 5
  28.  
  29.  
  30. # initialize modem
  31. #
  32. output $init\13
  33. if ! [input 10 OK\n]
  34.   display "Modem is not responding"\n
  35.   abort
  36. end
  37. #
  38. # setup our modem commands
  39. #
  40.  
  41. #
  42. # send phone number
  43. #
  44. %n = 0
  45. repeat
  46.   if %n = %attempts
  47.     display "Too many dial attempts"\n
  48.     abort
  49.   end
  50.   output "atdt"$number\13
  51.   %ok = [input 60 CONNECT]
  52.   %n = %n + 1
  53. until %ok
  54. input 10 \n
  55. #
  56. #  wait till it's safe to send because some modem's hang up
  57. #  if you transmit during the connection phase
  58. #
  59. wait 30 dcd
  60.  
  61. #
  62. #  wait for the username prompt
  63. #
  64. input 30 "ogin:"
  65. output $username\13
  66. #
  67. # and the password
  68. #
  69. input 30 "sword:"
  70. output $password\13
  71. display \n\n
  72. #
  73. # we are now logged in
  74. #
  75.  
  76.  
  77. display "WAIT, Sending PPP mode command..." \n \n
  78. input 60 "PPP"
  79.  
  80. display "...done.  Waiting for IP number..." \n \n
  81.  
  82. #
  83. # now we are finished.
  84. #
  85.