
Lesson #19b -- Explanation for Lesson 18b (cont)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

===========================  LINKED MACRO ==========================
1:  {:LNK}
----------------------------  DATA READ ----------------------------
2:      {ROPE %_hom%%bbsid.cfg}
3:      {READ esc_p}{READ esc_r}
4:      {READ bulet_p}{READ bulet_r}
5:      {READ persmail_p}{READ persmail_r}
6:      {READ main_p}{READ main_r}
7:      {READ supmen1_p}{READ supmen1_r}
8:      {READ supmen2_p}{READ supmen2_r}
9:      {READ mail_p}       (I had included a {READ mail_r} here, but it's
10:     {READ quit_r}        not required.)
11:     {READ suffix}
12:     {READ success_p}
13:     {READ anykey_p}
14:     {READ nomail_p}
15:     {RCLO}

#1:  This is the macro ID we'll use in our dialing directory as the
Linked Macro for every BBS.

#2-#14:  This area provides the key to the technique I'm presenting
for writing a generic script.  All BBS-specific (or *BBSware*
specific) data will be contained in a standard ASCII text file which
is external to the core script routines.  I've chosen to name this
text file with a variable name.  The variable will equate to the
BBSs' "bbsid" (prefix for the mail packets, i.e. "bbsid".qwk).  We
can set the bbsid in the .FON. Variables we'll be reading in from
this text file are:  the BBS' front-end mailer prompt for "press esc
to continue (esc_p), our response to that prompt (esc_r) which is
most likely either one of two values..one escape, or two
escapes..,the BBS' "Do you want to read new bulletins?" prompt
(bulet_p), our response to that prompt (bulet_r), the BBS' "Do you
want to read new mail prompt?" (persmail_p), our response to that
prompt (persmail_r), the BBS' Main Menu prompt (main_p), our response
to that prompt (main_r), any supplemental menu prompts that might
apply (supmen_1, supmen_2) and our responses (if applicable), the
Mail Door prompt (mail_p), what character we use to quit the mail
door (quit_r), whether or not we use Hot Keys on this BBS ("suffix"
which will either be "|" or "null"), what text the BBS sends to
signifiy a successful mail upload (success_p), what text the BBS uses
as its "Press Any Key" prompt (anykey_p), and what text the BBS uses
as its "No mail To Download" prompt (nomail_p).

These variables represent the majority of items you'll probably need
to account for in a generic session.  Sometimes, specific items
(e.g., supplemental menus) may not apply to any one BBS.  That's
fine.  In these cases, the values for these variables will just be
null in whichever BBS config file.  Some of the examples I included
in the "Read" area may not be required, e.g., response to "read
bulletins?" prompt..if we always say "N"o, then we can always send a
"n".

Later lessons will describe a method for automatically creating the
config files by using *another* macro to setup new BBSs in your
script directory.  You can create a setup macro which prompts you for
the appropriate data, and then writes the config file in the
correct format.  Easier to do it this way than to use a text editor
to manually create the config files.  You don't have to remember the
file structure of your config files if you use a routine that creates
the file automatically.

Explanation continues in Lesson 19c.

Jim
