home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 15
/
CD_ASCQ_15_070894.iso
/
vrac
/
petnet10.zip
/
PN_MAIL.SCR
< prev
next >
Wrap
Text File
|
1994-06-14
|
8KB
|
174 lines
; TEST script for echo mail runs from Critter Connection BBS for Qmodem Pro.
; It's only a Basic starting point that needs to be EDITED in parts, and
; also some of the Timings might need adjustments.
; Modified from the script listed in the QmodemPro 1.00 manual. Feel free
; to make any modifications you wish. If you make it better, then share it
; with everyone else.
;
; Used in conjunction with the included PN_MAIL.BAT file, it will try to
; make an unattended mail run to pick up Tomcat mail and send any new mail
; waiting to be sent. Make sure you edit DIALTXT, NAME, in the DEFINITIONS
; section to meet your requirements. (Leave UDONE and DDONE alone).
;
; IMPORTANT: You must have HotKeys turned off and Expert mode turned on in
; your user profile on the BBS, and also make sure the packet name is defined
; in the FON book entry for the system you will be calling before using this
; script.
;
; If you'll be using other comm. programs i.e. Robocom, Telix, Boyan etc.
; please share with us your script(s) so that they'll be available for
; others. Thanks!
;
;
TurnOn 8_BIT
TurnOff LINEFEED
TurnOff XON/XOFF
TurnOff NOISE
TurnOff MUSIC
TurnOn SCROLL
TurnOff PRINT
TurnOff ECHO
Capture MAILRUN.CAP
Log MAILRUN.LOG
;
; ------------------------ DEFINITIONS -------------------------
;
String NAME UDONE DDONE DOOR MAXTRIES FONTXT TCLOGOFF DIALTXT
Assign DIALTXT "PN_Mail" ; unique text string from FON file
Assign NAME " ***fill in here*** " ; Name and Password on BBS
Assign UDONE N ; Upload done?
Assign DDONE N ; Download done?
Assign MAXTRIES 7 ; Maximum attempts to connect
Assign TCLOGOFF N ; Set Logoff after upload to N in Tomcat
;
; --------------------- END DEFINITIONS ------------------------
;
Restart: ; Go here if the connection gets
; broken then stamp log
Stamp NO CARRIER detected, restarting script
; Notes:
; The DIAL command uses the ability to call a specific number, without
; knowing the exact position in the .FON file. The example DIALTXT set up
; in this script will search the .FON file for the text "MSI HQ". By using
; the Text dial option and specifying this, it will dial this number even
; if the FON book is sorted. Note the 'T' prefix in the DIAL line below...
;-----
; Dial section starts here
;-----
Decr MAXTRIES ; decrement the counter
If "$MAXTRIES" = "0" TooManyTries ; if none left goto TooManyTries
If $ONLINE SkipDial ; skip the dial if online already
Dial "T$DIALTXT" ; dial selected entry
SkipDial:
TimeOut 1200 OutOfTime ; set Waitfor timeout to 1200 seconds
Goto Top ; jump to start of main body
OutOfTime: ; come here if something times out
Hangup ; hang up the phone
Delay 10000 ; wait 10 seconds
Hangup ; hang up again (just in case)
Delay 30000 ; wait 30 seconds
Goto Restart ; start over again
;-----
; Main Body starts here
;-----
Top: ; label for main body of script
When "NO CARRIER" Restart ; goto label restart if fails
When "[S]top?" "S^M" ; send S Enter at any pause prompt
When "[L]ist mail, or [C]on" "C^M" ; send C Enter at mail notice
Waitfor "First Name"
Delay 300
Send "!***** fill in here *****^M" ; Don't forget to put ! in front.
Waitfor "Are you" ; No need to fill this in
Delay 200
Send "Y^M"
Waitfor "TOMCAT MENU" ; wait for the Tomcat menu prompt
;-----
CmdLoop: ; label for command loop
If "$DDONE" = "N" DoDownload ; download not done, do it
If "$UDONE" = "N" DoUpload ; upload not done, do it
Goto AllDoneN ; only if both of above are done
;-----
DoDownload: ; label for download section
When "nothing" DownloadOK ; go to label if no msgs to download
Send "^M" ; send ENTER for check (optional)
Waitfor "TOMCAT MENU" ; wait for menu again (optional)
Delay 2000 ; wait 2 seconds
Send "D^M" ; send D ENTER for download
Waitfor "receive this packet" ; wait until packet is ready
Delay 100 ; delay .1 seconds
Send "Y^M" ; answer Y ENTER
Waitfor "$PACKET.QWK" ; wait until it's ready to send
Stamp Beginning download of $QWKPATH$PACKET.QWK ; stamp log
Download Z $QWKPATH$PACKET.QWK ; start the download
If $SUCCESS DownloadOK ; if ok, branch to label
Stamp Download FAILED ; make note in log that it failed
Goto DoDownload ; and do it again
;-----
DownloadOK: ; label for OK downloads
Stamp Download successful ; make note in log that it was a success
Assign DDONE Y ; change download flag to Y
Goto CmdLoop ; branch back to Command Loop
;-----
DoUpload: ; label for upload section
Delay 2000 ; wait for 2 seconds
Send "^M" ; send ENTER key (optional)
Waitfor "TOMCAT MENU" ; wait for Tomcat (optional)
Delay 200 ; wait .2 seconds
Exist $REPPATH$PACKET.REP SendMsgs ; if there are messages to send then
; goto SendMsgs
Assign UDONE Y ; if no messages to send, flag that
; uploading is done
Goto CmdLoop ; and branch back to Command Loop
;-----
SendMsgs: ; label for SendMsgs section
Send "U^M" ; send U ENTER
Waitfor "$PACKET.REP" ; wait until Tomcat is ready
Pause 1000 ; wait 1 second
Upload Z $REPPATH$PACKET.REP ; start the upload
If $FAIL DoUpload ; if not OK then do it again
;DeleteF $REPPATH$PACKET.REP ; If not renamed in the batch file, delete the .REP
If "$TCLOGOFF" = "Y" AllDoneY ; if Tomcat set to logoff after upload
; branch to AllDoneY
Assign UDONE Y ; set upload flag to Y
;-----
AllDoneN: ; label when up and downloads are done
When ; cancels all previous When tracking
Send "^M" ; send ENTER (optional)
Waitfor "TOMCAT MENU" ; wait for menu
Send "G^M" ; send G ENTER to logoff
Delay 10000 ; wait 10 seconds (adjust)
Goto EndGame ; branch to EndGame label
;-----
AllDoneY:
When ; stop tracking all previous WHENs
When "Auto Logoff" "H^M" ; send H + ENTER to logoff
Assign UDONE Y ; set the upload done flag
;-----
EndGame: ; label for end of script
Hangup ; hangup the modem
Delay 2000 ; wait 2 seconds
Send "ATM0H1^M" ; take modem offhook
TurnOff Log ; close the log file
System Y ; exit back to DOS
Exit ; end of script (if successful)
;-----
TooManyTries:
Stamp "Mail attempt failed..." ; place notice in log file
TurnOff Log ; close the log file
Exit ; end of script (if failure)