home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 3 Comm / 03-Comm.zip / AUTOPO.ZIP / GETNEW.ASP next >
Text File  |  1991-08-28  |  4KB  |  80 lines

  1. ;GETNEW.ASP  IBM EEP BBS posting script for automatically dialing,
  2. ;logging in, and getting new messages from all message bases.
  3. ;Public Domain....by Don Babcock Jr. P.E.  8/91
  4. proc main
  5. set baudrate 2400
  6. init n1 4                       ;initialize a retry variable for 3 tries
  7. start:                          ;retry label
  8. dec n1                          ;decrement retry counter
  9. if zero n1                      ;if expired execute another scrip
  10.     execute "getnew"        ;in this case, retry this one indefinitely
  11. endif
  12. hangup                          ;hangup the line
  13.     transmit "AT^M"         ;have we got a live modem?
  14. waitfor "OK" 4
  15. if not waitfor                  ;if not start over
  16.      GOTO start
  17. endif
  18. transmit "ATZ^M"                ;reset modem
  19. pause 1                         ;wait a second
  20. transmit "ATV1^M"               ;set up verbal result codes level 1
  21. waitfor "OK" 4                  ;ack
  22. if not waitfor                  ;not ack-ed, start over
  23.     GOTO start
  24. endif
  25. pause 1                         ;wait a second
  26. transmit "ATX6^M"               ;set up response level
  27. waitfor "OK"
  28. if not waitfor                  ;if not set up start over
  29.     GOTO start
  30. endif
  31. pause 1                         ;wait a second
  32. transmit "ATDT9,18004263389^M"  ;dial the IBM EEP BBS
  33. waitfor "CONNECT 2400" 60       ;wait for a connection
  34. if not waitfor                  ;if we didn't get it start over
  35.     GOTO start
  36. endif
  37. pause 1                         ;wait a second
  38. waitfor "First Name ->" 60      ;wait for login prompt
  39. if not waitfor
  40.      GOTO start             ;didn't get it, start over
  41. endif
  42. pause 1                         ;wait a second
  43. transmit "Don^M"                ;send first name
  44. waitfor "Last Name ->" 60       ;wait for login prompt
  45. if not waitfor
  46.      GOTO start             ;didn't get it, start over
  47. endif
  48. pause 1                         ;wait a second
  49. transmit "Babcock^M"            ;send last name
  50. waitfor "(Not Displayed) ->" 60 ;wait for password prompt
  51. if not waitfor
  52.      GOTO start             ;didn't get it, start over
  53. endif
  54. pause 1
  55. transmit "(your passowrd)^M"    ;send password
  56. waitfor "ontinue?" 60           ;wait for next prompt
  57. transmit "^M"                   ;send a carriage return (CARET)
  58. waitfor "execute ?" 60          ;wait for command prompt
  59. transmit "CA^M"                 ;send CA <CR> to collect all messages
  60. waitfor "to quit?"              ;wait for prompt
  61. transmit "N^M"                  ;get only NEW messages
  62. waitfor "to quit?"              ;wait for prompt
  63. transmit "A^M"                  ;get ALL messages
  64. waitfor "execute ?" 300         ;wait for the command prompt for up to 300
  65.                 ;seconds wile messages are bundled
  66. transmit "D^M"                  ;send DOWNLOAD command
  67. waitfor "to quit?"              ;wait for prompt
  68. transmit "M^M"                  ;select MARKED messages
  69. waitfor "to quit?"              ;wait for prompt
  70. transmit "B^M"                  ;select file [B] (zipped messages)
  71. waitfor "to abort"              ;wait for protocol sub-command prompt
  72. transmit "Z^M"                  ;select Z protocol
  73. waitfor "[Return]?"             ;wait for auto logoff query prompt
  74. transmit "Y^M"                  ;select automatic logoff after download
  75. getfile zmodem                  ;transfer the file using ZMODEM protocol
  76. pause 2                         ;wait 2 seconds
  77. transmit "^M"                   ;send a CARET to speed logoff
  78. hangup                          ;hangup the modem
  79. quit                            ;exit PROCOMM
  80. endproc