home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 3 Comm
/
03-Comm.zip
/
roboos2b.zip
/
OS2-DOW2.RS
< prev
next >
Wrap
Text File
|
1994-03-11
|
2KB
|
87 lines
TITLE "OS2Shareware File Download"
;Will download up to 1 file, the OS2-DOW.RS script will do up to 9
;For more use a second script.
; The numbers on the next lines don't actually do anything. They are
; only added to increase the readability of the script. Robocomm
; always numbers parameters in the order they are encountered in
; the file.
PARAMETER 1 "Enter File Name to GET"
ENDPARAMS
TIMEOUT 120
IF NOT CONNECTED GOTO NotOn
WHEN "MESSAGE: SEND "M"
SEND "|"
WHEN "to continue" Send "|"
WHEN "More [Y,n,=]?" SEND "|"
; Send a bunch of <CR> to get through the other prompts
; without modifications
CLEAR
WHEN "to continue" Send "|"
WHEN "More [Y,n,=]?" SEND "|"
SEND "||"
WAITFOR "MAIN:" FAILURE HANGUP
; Change to File Area
MESSAGE "Changing to File Area"
SEND "F"
WAITFOR "FILE:"
; Getting File
:GetFile1
IF EMPTY "%P1%" GOTO GetFile2
Message "Initiating Download of %P1% "
Send "D"
Waitfor "download (#"
Message "Requesting %P1% file"
IF NOT EMPTY "%P1%" SEND "%P1%|"
CLEAR
; Watch if unable to download file.
WHEN "I see no" GOTO NoFile1
WHEN "Transfer aborted." GOTO Aborted1
WAITFOR "download (#"
Message "Sending Enter To Start Download"
SEND "|"
Waitfor "times to cancel."
Message "Starting Protocol"
Download "%DLDIR%%P1%" Using "%BBS20%"
IF ERRORLEVEL GOTO ProtocolError
SEND "||"
WAITFOR "FILE:"
; Quit to the main prompt
SEND "M"
Exit 0
:NoFile1
MESSAGE "File %P1% is not on board"
GOTO DownloadError
:Aborted1
Message "Transfer aborted, Probably no time"
GOTO DownloadError
:ProtocolError
MESSAGE "Download of %P1% Failed, Protocol Error, maybe no disk space"
GOTO DownloadError
:DownloadError
SEND "||"
WAITFOR "FILE:"
; Quit to the main prompt
SEND "M"
Exit 1
:NotOn
Message "Make Sure SCript to Execute After Log On"
Message "is Set in BBs Systems"
Exit 1