BBS Script "Gets ahead of itself" - Protocols

This is a discussion on BBS Script "Gets ahead of itself" - Protocols ; Still a relatively new kermit script writer, am automating a BBS logon we must do daily, where I send (output) my login info and then make a request of the BBS, i.e. lineout $$REQ DOWNLOAD OUR_FILES PARAM1 PARAM2 PARAM3 I ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: BBS Script "Gets ahead of itself"

  1. BBS Script "Gets ahead of itself"

    Still a relatively new kermit script writer, am automating a BBS logon we
    must do daily,
    where I send (output) my login info and then make a request of the BBS, i.e.

    lineout $$REQ DOWNLOAD OUR_FILES PARAM1 PARAM2 PARAM3

    I have kermit set up to autodownload the files, which are available via
    ZMODEM.

    How do I set up my script such that it does not "run ahead" and post-process
    the files
    before all of them are downloaded?

    Thanks for any suggestions.

    -BoZ



  2. Re: BBS Script "Gets ahead of itself"

    In article <5casb.80068$v82.4551802@twister.southeast.rr.com>, x@y.org wrote:
    : Still a relatively new kermit script writer, am automating a BBS logon we
    : must do daily, where I send (output) my login info and then make a request
    : of the BBS, i.e.
    :
    : lineout $$REQ DOWNLOAD OUR_FILES PARAM1 PARAM2 PARAM3
    :
    : I have kermit set up to autodownload the files, which are available via
    : ZMODEM.
    :
    : How do I set up my script such that it does not "run ahead" and
    : post-process the files before all of them are downloaded?
    :
    Zmodem is like Kermit; it can send a group of files in one download. If
    that's what your BBS does, then Kermit executes only one (perhaps implied)
    RECEIVE command, and after that it's safe to start disposing of the files.
    In this case you might want to disable autodownload and just give a RECEIVE
    command at the point where you know the BBS will start sending:

    set protocol zmodem
    lineout $$REQ DOWNLOAD OUR_FILES PARAM1 PARAM2 PARAM3
    receive
    if fail (do something)
    ; postprocess the files here.

    Or the BBS might do one Zmodem transfer per file, which is kind of annoying,
    but Kermit can handle that too. First find out what messages can be
    displayed when the transfer completes, then have Kermit look for them.
    For simplicity let's assume there's only one message, so you can use a
    simple INPUT command that either succeeds or fails:

    set protocol zmodem
    set input autodownload on
    input 120 All files downloaded
    if fail (do something)

    When INPUT AUTODOWNLOAD is ON and an INPUT command is active, the download
    begins automatically when Zmodem sends its ID string, **^XB000000... or
    whatever. If the INPUT command is still active after the Zmodem download
    and another Zmodem download starts, the second transfer also begins
    automatically, and so on. The trick is to set the INPUT timeout interval
    long enough to accommodate the longest expected series of transfers. It
    will still terminate immediate when the specified message appears, but you
    don't want it to time out before all the files have been sent.

    - Frank

  3. Thanks!!! RE: BBS Script "Gets ahead of itself"

    Frank,

    Thank you very much for your prompt and helpful reply. I have **never**
    regretted purchasing kermit and use it to
    accomplish a variety of tasks 'automagically' that formerly took significant
    staff effort on a daily basis.

    I was not aware of the set input autodownload function, and that with the
    following seems to work
    (testing for the B00 given by ZMODEM when a file is completed):

    input 90 B00
    if fail stop 1 files either not completely received or no files waiting
    post-process retrieved files

    Is there a better string I should test for to ensure that all of the files
    (sent one at a time) are received?



  4. Re: Thanks!!! RE: BBS Script "Gets ahead of itself"

    In article , x@y.org wrote:
    : Thank you very much for your prompt and helpful reply. I have **never**
    : regretted purchasing kermit and use it to accomplish a variety of tasks
    : 'automagically' that formerly took significant staff effort on a daily
    : basis.
    :
    Good, thanks for saying so.

    : I was not aware of the set input autodownload function, and that with the
    : following seems to work (testing for the B00 given by ZMODEM when a file is
    : completed):
    :
    : input 90 B00
    : if fail stop 1 files either not completely received or no files waiting
    : post-process retrieved files
    :
    : Is there a better string I should test for to ensure that all of the files
    : (sent one at a time) are received?
    :
    Isn't that a Zmodem startup string? In that case, INPUT will never see it
    because it is absorbed by the autodownload scanner.

    I think it might be better to wait for a text message or menu fragment from
    the BBS that appears only after all files have been sent. In case there is
    more than one such message (e.g. one for success another for failure), use
    MINPUT rather than INPUT.

    - Frank

  5. RE: Resolution of Issue

    Frank, with wisdom and grace wrote:
    >I think it might be better to wait for a text message or menu fragment from
    >the BBS that appears only after all files have been sent. In case there is
    >more than one such message (e.g. one for success another for failure), use
    >MINPUT rather than INPUT.


    I get no messages back from the system when download is complete giving
    me the status, but I do get my command prompt back, hence...

    I have now utilized this snippet successfully - works beautifully...

    input 90 \fpattern(cmd)
    if success goto ....

    Again, thank you very much for the wonderful job that you do.



+ Reply to Thread