
Lesson #17 - Common Denominators In BBS Sessions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If your objective is to write a generic script that handles sessions
on multiple BBSs/BBSware types, then the first step to be undertaken
is to determine similarities and differences inherent with all
mailrun sessions.  Eventually, the similarities will become common
core routines and the differences are going to be assigned to
variables as we code the script.

What does a typical mailrun session with a BBS look like?  Isn't it
something along the following outline?:

        1. dial the BBS

        2. connect with the BBS

          2a. depending upon which BBS, respond to front-end mailer
              request to "Press Esc"

          2b. depending upon BBS, respond to "Press key to Continue"
              prompts to get through opening sequence

        3. enter logon info (first name/last name/password)

           3a.  depending upon BBS/BBSware, sometimes we have to
                input supplementary logon info, e.g.,
                birthdate..phone number, etc.

        4. look for the "Main Menu" prompt

          4a. sometimes we need to provide keyboard input to get past
              screen sequences between logon data and Main Menu.
              Examples include "want to read News Bulletin?", "want
              to read new personal mail now?", "here's a screen or
              two of pretty pictures, for sale ads, jokes,
              whatever"...'gotta press a key to continue during/after
              each one.

        5. enter command at "Main Menu" to get to Mail Door

          5a. sometimes there's a secondary Menu (e.g., "Door Menu")
              we need to traverse before we get to the Mail Door

        6. look for the Mail Door "command" prompt

          6a. sometimes we have to "press key to continue" before Mail
              Door prompt comes up

        7. check to see if we have replies to send, if so, tell the
           Mail Door we're going to upload replies

          7a. look for the protocol startup string, execute the
              protocol..send the replies

          7b. after sending replies, check to see if upload
              successful..if so, delete the replies

          7c. after upload, watch for the Mail Door command prompt to
              appear again

        8. if no replies to send, then tell Mail Door we want to
           download new mail

          8a. sometimes the mail door will tell us there is no new
              mail to send..if this is the case, be on the lookout for
              the Mail Door command prompt to appear again

          8b. sometimes we have to answer "Y/N" on whether or not to
              d/l the assembled .QWK packet

          8c. look for the protocol startup string..execute the
              protocol..d/l the new mail

        9. after mail download, logoff the BBS

          9a. sometimes we can logoff directly from the mail door,
              sometimes we have to go back to the BBS Main Menu prompt

       10. dial next BBS for mail..repeat above process

         10a. make sure any "cleanup" actions have been accomplished
              before dialing the next board.

         10b. if no more BBSs to dial, then exit {COMMO}

Take the time to study the above outline..add any steps you think are
necessary.  The more complete the outline..the more generic the final
script will become.

End of Lesson 17..next lesson, "Defining The Core Processes"
