home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 December
/
simtel1292_SIMTEL_1292_Walnut_Creek.iso
/
msdos
/
qmodem
/
allscrpt.arc
/
AUTO.SCR
next >
Wrap
Text File
|
1987-10-17
|
7KB
|
281 lines
. GEnie Automatic RoundTable Download Script for Qmodem 3.00+,
. This script has been modified from
. RTDOWNX by Steven C. Barnes (GEnie address SCB)
. The addtional parameters have been added to utilize V3.0
. The choice of roundtable has been changed to TIME
. To allow unattended downloads
. Questions ?? contact Steve Aldridge (GEnie addres S.ALDRIDGE)
note Script to access GEnie and download up to 9 XMODEM files.
.test for the first two parameters
GOTO $1-A
-A:
note You must enter the time to initiate the call (00:00:00 etc)
note and ONE FILENAME or FILENUMBER (maximum of 9), to get from GEnie.
note DOWNLOAD SCRIPT IS ABORTING! (Sorry!)
RETURN
.Okay, let's begin.
$1-A:
beep 2000
beep 1000
note TIME to access: "$0"
note XMODEM files to get: "$1" "$2" "$3" "$4"
note "$5" "$6" "$7" "$8" "$9"
note If the above is NOT CORRECT, Press Escape Now!
note (a short pause to consider...)
beep 2000
beep 1000
.6 second pause
send "~~~~~~~~~~~~"
TURNOFF XON\XOFF NOISE
.no interuptions please!
WAITUNTIL $0
.OK!, call GEnie...
RETRY:
DIAL "1" .GEnie is #1! (on my system)
note ******* Auto Log-on to GEnie ******
TIMEOUT 10 NOGENIE .Set timeout for bad handshake
SEND "H~H~H" .Handshake with GEnie, gently, by the book of GEnie
WAITFOR "U#="
TIMEOUT 60 ERROR .setup regular error area
.Send Account# & Password, go to page 600, A VERY short menu
SEND "~????????,????,615{"
.Wait for end of first [mandatory] menu
WAITFOR "<H>elp?"
.At menu prompt slip into high gear, COMMAND MODE.
SEND "~C{"
WAITFOR "P 615?"
.Choose software library
SEND "3{"
WAITFOR "?"
.Request download a file from menu
SEND "6{"
WAITFOR "file?"
.RT activity log ON
.Note you must specify the path if another other than the Qmodem
.directory is desired Example (CAPTURE B:\CAPTURE\LOG.RT )
CAPTURE C:\QMODEM\CAPTURE\LOG.RT
.warn user about the following short pause, not to worry!
note AUTO in progress. One moment please...
.This area tests for each parameter, backwards from the ninth one,
.then enters the main routine below at the appropriate point.
.We already tested for the first parameters so all we need is...
goto $9-9
-9:
goto $8-8
-8:
goto $7-7
-7:
goto $6-6
-6:
goto $5-5
-5:
goto $4-4
-4:
goto $3-3
-3:
goto $2-2
-2:
goto $1-1
.Main Routines area
.After entering at the right label below, scripts flow/fall through to end.
.XMODEM DOWNLOAD MAIN ROUTINES
.Note if a path other than the default is desired you must modify
.the download command in all 9 routines ($9-9 thru $9-1)
.Example (DOWNLOAD B:\DLOADS\$9 X)
$9-9:
note [9] "$9" .TASK #9, show the task name!
SEND "$9{" .request the desired file
WAITFOR "or <Q>uit." .wait for the download prompt
SEND "~D{" ."d" is for download
WAITFOR "receive file." .wait for start of transmit
DOWNLOAD C:\QMODEM\DLOAD\$9 X .download with XMODEM protocol
WAITFOR "<RETURN>?" .XMODEM download ends automatically
SEND "{" .press return
WAITFOR "another file (Y/N)?"
SEND "Y{" .say yes for each time, except for the last file
WAITFOR "file?" .we waitfor this next prompt ONLY after saying yes
. the rest repeats the above nine times
. comments have been deleted to keep it all shorter
$8-8:
note [8] "$8"
SEND "$8{"
WAITFOR "or <Q>uit."
SEND "~D{"
WAITFOR "receive file."
DOWNLOAD C:\QMODEM\DLOAD\$8 X
WAITFOR "<RETURN>?"
SEND "{"
WAITFOR "another file (Y/N)?"
SEND "Y{"
WAITFOR "file?"
$7-7:
note [7] "$7"
SEND "$7{"
WAITFOR "or <Q>uit."
SEND "~D{"
WAITFOR "receive file."
DOWNLOAD C:\QMODEM\DLOAD\$7 X
WAITFOR "<RETURN>?"
SEND "{"
WAITFOR "another file (Y/N)?"
SEND "Y{"
WAITFOR "file?"
$6-6:
note [6] "$6"
SEND "$6{"
WAITFOR "or <Q>uit."
SEND "~D{"
WAITFOR "receive file."
DOWNLOAD C:\QMODEM\DLOAD\$6 X
WAITFOR "<RETURN>?"
SEND "{"
WAITFOR "another file (Y/N)?"
SEND "Y{"
WAITFOR "file?"
$5-5:
note [5] "$5"
SEND "$5{"
WAITFOR "or <Q>uit."
SEND "~D{"
WAITFOR "receive file."
DOWNLOAD C:\QMODEM\DLOAD\$5 X
WAITFOR "<RETURN>?"
SEND "{"
WAITFOR "another file (Y/N)?"
SEND "Y{"
WAITFOR "file?"
$4-4:
note [4] "$4"
SEND "$4{"
WAITFOR "or <Q>uit."
SEND "~D{"
WAITFOR "receive file."
DOWNLOAD C:\QMODEM\DLOAD\$4 X
WAITFOR "<RETURN>?"
SEND "{"
WAITFOR "another file (Y/N)?"
SEND "Y{"
WAITFOR "file?"
$3-3:
note [3] "$3"
SEND "$3{"
WAITFOR "or <Q>uit."
SEND "~D{"
WAITFOR "receive file."
DOWNLOAD C:\QMODEM\DLOAD\$3 X
WAITFOR "<RETURN>?"
SEND "{"
WAITFOR "another file (Y/N)?"
SEND "Y{"
WAITFOR "file?"
$2-2:
note [2] "$2"
SEND "$2{"
WAITFOR "or <Q>uit."
SEND "~D{"
WAITFOR "receive file."
DOWNLOAD C:\QMODEM\DLOAD\$2 X
WAITFOR "<RETURN>?"
SEND "{"
WAITFOR "another file (Y/N)?"
SEND "Y{"
WAITFOR "file?"
$1-1:
note [1] "$1"
SEND "$1{"
WAITFOR "or <Q>uit."
SEND "~D{"
WAITFOR "receive file."
DOWNLOAD C:\QMODEM\DLOAD\$1 X
WAITFOR "<RETURN>?"
SEND "{"
WAITFOR "another file (Y/N)?"
.no task for $0 here, falling through to...
.end of the task routines
.RT capture file off
CAPTURE OFF
SEND "N{" .say no more files please
WAITFOR "?" .get to a GEnie page#
.GENIE log off routine
note Logging-off GEnie!
SEND "BYE{"
WAITFOR "day!"
.GE log file on
CAPTURE LOG.GE
WAITFOR "OFF AT" .good, GEnie is hanging up
.close general log
CAPTURE OFF
TIMEOUT 7 NOERROR .make it ok to timeout in here.
WAITFOR "NO CARRIER"
.cleans the screen up, gobbles garbage but no real error if timeout
NOERROR:
note .
note AUTO completed successfully! ON AT "$0"
note We got files "$1", "$2", "$3".
note "$4", "$5", "$6".
note "$7", "$8", "$9".
RETURN
ERROR:
.if script is running unattended, wait 20 secs, then hang up to be good
note THIS SCRIPT HAS FAILED .
note The filename may not exist on GEnie, it may be an illegal DOS name,
note or another failure. Check ScrollBack and RT log file "RT.LOG".
note This Script has failed using parameters:
note TIME: "$0" Files: "$1" "$2" "$3"
note "$4" "$5" "$6"
note "$7" "$8" "$9"
beep 500
beep 600
beep 700
note PRESS ESCAPE NOW!!
. 1 2 3 4 5 6 7 8 9 0
SEND "~~~~"
beep 500
beep 600
beep 700
note PRESS ESCAPE NOW!!
SEND "~~~~~~~~~~~~~~~~~~"
TIMEOUT 5 EHANGUP
.waitfor here to catch escape key
WAITFOR "anything"
EHANGUP:
.nobody is home, hangup for safety
HANGUP
RETURN
NOGENIE:
.handshaking/log-on error
beep 100
beep 100
note We never got onto GEnie, sorry!
HANGUP
RETURN
.end of script