home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 3 Comm
/
03-Comm.zip
/
AUTOPO.ZIP
/
GETNEW.ASP
next >
Wrap
Text File
|
1991-08-28
|
4KB
|
80 lines
;GETNEW.ASP IBM EEP BBS posting script for automatically dialing,
;logging in, and getting new messages from all message bases.
;Public Domain....by Don Babcock Jr. P.E. 8/91
proc main
set baudrate 2400
init n1 4 ;initialize a retry variable for 3 tries
start: ;retry label
dec n1 ;decrement retry counter
if zero n1 ;if expired execute another scrip
execute "getnew" ;in this case, retry this one indefinitely
endif
hangup ;hangup the line
transmit "AT^M" ;have we got a live modem?
waitfor "OK" 4
if not waitfor ;if not start over
GOTO start
endif
transmit "ATZ^M" ;reset modem
pause 1 ;wait a second
transmit "ATV1^M" ;set up verbal result codes level 1
waitfor "OK" 4 ;ack
if not waitfor ;not ack-ed, start over
GOTO start
endif
pause 1 ;wait a second
transmit "ATX6^M" ;set up response level
waitfor "OK"
if not waitfor ;if not set up start over
GOTO start
endif
pause 1 ;wait a second
transmit "ATDT9,18004263389^M" ;dial the IBM EEP BBS
waitfor "CONNECT 2400" 60 ;wait for a connection
if not waitfor ;if we didn't get it start over
GOTO start
endif
pause 1 ;wait a second
waitfor "First Name ->" 60 ;wait for login prompt
if not waitfor
GOTO start ;didn't get it, start over
endif
pause 1 ;wait a second
transmit "Don^M" ;send first name
waitfor "Last Name ->" 60 ;wait for login prompt
if not waitfor
GOTO start ;didn't get it, start over
endif
pause 1 ;wait a second
transmit "Babcock^M" ;send last name
waitfor "(Not Displayed) ->" 60 ;wait for password prompt
if not waitfor
GOTO start ;didn't get it, start over
endif
pause 1
transmit "(your passowrd)^M" ;send password
waitfor "ontinue?" 60 ;wait for next prompt
transmit "^M" ;send a carriage return (CARET)
waitfor "execute ?" 60 ;wait for command prompt
transmit "CA^M" ;send CA <CR> to collect all messages
waitfor "to quit?" ;wait for prompt
transmit "N^M" ;get only NEW messages
waitfor "to quit?" ;wait for prompt
transmit "A^M" ;get ALL messages
waitfor "execute ?" 300 ;wait for the command prompt for up to 300
;seconds wile messages are bundled
transmit "D^M" ;send DOWNLOAD command
waitfor "to quit?" ;wait for prompt
transmit "M^M" ;select MARKED messages
waitfor "to quit?" ;wait for prompt
transmit "B^M" ;select file [B] (zipped messages)
waitfor "to abort" ;wait for protocol sub-command prompt
transmit "Z^M" ;select Z protocol
waitfor "[Return]?" ;wait for auto logoff query prompt
transmit "Y^M" ;select automatic logoff after download
getfile zmodem ;transfer the file using ZMODEM protocol
pause 2 ;wait 2 seconds
transmit "^M" ;send a CARET to speed logoff
hangup ;hangup the modem
quit ;exit PROCOMM
endproc