Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Retrievals

Status
Not open for further replies.

trolley

Programmer
Jan 29, 2004
62
US
I am having problem with retrieving multiple files from a BBS. The first retrieval works just fine, but the second one times out. Below is the code I am using. I am using a variation of the code that was posted here to look for strings that appear on the screen in order to know what to do next. Any help would be very much appreciated.

Code Example:

sTMPSTR1 = "Start your local YMODEM receive now"
sTMPSTR2 = $NULLSTR
sTMPSTR3 = $NULLSTR

accSTRWAIT (30, sTMPSTR1, sTMPSTR2, sTMPSTR3)

switch iWAITSTAT

case 1
getfile 5
while $XFERSTATUS == 1
yield
endwhile
endcase

default
accERROR (7)
endcase

endswitch

accMENU ("AECN: SENDING REPORT/MAIL", "GOTREPORT", 30, 7)

statmsg "Ready to Retrieve Activity Report"

sTMPSTR1 = "Start your local YMODEM receive now"
sTMPSTR2 = $NULLSTR
sTMPSTR3 = $NULLSTR

accSTRWAIT (30, sTMPSTR1, sTMPSTR2, sTMPSTR3)

$XFERSTATUS = 1

switch iWAITSTAT

case 1
getfile 5
while $XFERSTATUS == 1
yield
endwhile
endcase

default
accERROR (7)
endcase

endswitch

 
Since you are only looking for one string, I would use someting like:

if waitfor "Start your local YMODEM receive now"
(file transfer code here)
else
(failure code here)
endif

This will be a little cleaner way of performing the multiple downloads.


aspect@aspectscripting.com
 
Thanks Knob for your suggestion, but that did not work. I have decided to just skip the last retrieval.

The last retrieval is just a activity of what you did while logged in. I do not do anything with this log anyway.

Again thanks
 
trolley -- I've used this type of BBS in the not so distant past. It's terrible, but it's what we're stuck with. Although I use a different product to download files, the concept is the same. It seems to work ok with having two separate download routines, and in essence, here is what we do (for what it's worth):


WAITFOR "AECN:"
---Download File Routine---
WAITFOR "SENT"
TRANSMIT "GOTFILE^M"
WAITFOR "REPORT"
---Download Activity Rpt Routine---
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top