home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Current Shareware 1994 January
/
SHAR194.ISO
/
modem
/
jbtutor1.zip
/
LESSON8.TXT
< prev
next >
Wrap
Text File
|
1993-09-19
|
2KB
|
65 lines
SETLook:
This command is very important..but very easy to learn. This
is the method you would use to specify how long your "LOOK"
statements should actually look for the target string..and what macro
id should be executed if the "LOOK" times out. Optionally, you can
specify a string to send if there's a period of inactivity (no
characters received) while the macro is waiting for the specified
prompt. A "period of inactivity" could mean an unexpected prompt has
shown up..no characters are coming in because the BBS is waiting for
a response to the unexpected prompt. Normally, one would specify a
carriage return be sent during the optional timeout period.
There are two ways you can use "SETL" -- "globally" or
"locally". By "globally", I mean you specify your SETLook parameters
only one time in the script..somewhere near the beginning..or at
least somewhere before the first "LOOK" occurs. This parameters
specified by this single SETLook would be used by all subsequent LOOK
commands. By "locally", I mean you can specify SETLook parameters
for individual LOOK commands. An example of a "global" use would be:
{:ID1}
{SETL 60,goodbye,5,|}
{LOOK prompt1}
.
.
{:ID1A}
.
{LOOK prompt2}
.
{:ID1B}
.
{LOOK prompt2}
Example of "local" would be:
{:ID1}
{SETL 60,goodbye,5,|}
{LOOK prompt1}
.
.
{:ID1A}
{SETL 30,nogo}
{LOOK prompt2}
.
{:ID1B}
{SETL 45,thisone,20,n|}
{LOOK prompt2}
---------
Personally, I prefer to tailor the SETLook variables for
individual LOOK statements because different points in a BBS session
mean different expected times for prompts to come in. For example,
the mail fetch/pack routine can take a relatively long time
(especially if the BBS has a lot of conferences to scan..or if the
BBS is running on a slow machine). The "First Name?" prompt, though,
might come in relatively fast. I don't want to set a default timeout
period which is based on the longest time for a prompt to appear
because this could result in my remaining on line longer than I need
to be if the script "hangs" for some reason.
Bottom line, though..if you have even a single "LOOK" in your
script, you should have at least one SETLook..
Jim