home *** CD-ROM | disk | FTP | other *** search
/ zipcon.net / www.zipcon.net.tar / www.zipcon.net / pub / win31 / allfiles / login.cmd < prev    next >
OS/2 REXX Batch file  |  1996-05-25  |  1KB  |  67 lines

  1. #trace on
  2. #
  3. if ![load $number]
  4.   if [query $number "Call wait # (one space for none)"]
  5.     save $number
  6.   end
  7. end
  8. if ![load $init]
  9.   if [query $init "Enter modem init (AT&F&K3 usually works)"]
  10.     save $init
  11.   end
  12. end
  13. if ![load $username]
  14.   if [username "Enter your login username"]
  15.     save $username
  16.   end
  17. end
  18. if ![load $pass]
  19.   if [query $pass "Enter your login password"]
  20.     save $pass
  21.   end
  22. end
  23.  
  24. %attempts = 10
  25.  
  26. DISPLAY \n
  27. DISPLAY \n
  28. DISPLAY ======= Now dialing Zipnet, press ESC to abort ==========\n
  29. DISPLAY \n
  30. DISPLAY \n
  31. #
  32. # initialize modem
  33. #
  34.  
  35. OUTPUT ATZ\13
  36. input 10 OK
  37.  
  38. OUTPUT $init\13
  39. #input 10 OK
  40. sleep 2
  41.  
  42. #
  43. # send phone number
  44. #
  45. %n = 0
  46. repeat
  47.   if %n = %attempts
  48.     DISPLAY ======== Too many dial attempts =========\n
  49.     DISPLAY ======== sorry, try again later =========\n
  50.     abort
  51.   end
  52.   output "atdt"$number",524-7696"\13
  53.   %ok = [input 60 CONNECT]
  54.   %n = %n + 1
  55. until %ok
  56.  
  57. #
  58. # send username and password
  59. #
  60. input 30 gin: 
  61. output P$username\13
  62. input 60 word: 
  63. output $pass\13
  64. sleep 1
  65. ONLINE
  66. sleep 1
  67.