home *** CD-ROM | disk | FTP | other *** search
/ Current Shareware 1994 January / SHAR194.ISO / modem / jbtutor1.zip / LESSON8.TXT < prev    next >
Text File  |  1993-09-19  |  2KB  |  65 lines

  1. SETLook:
  2.  
  3.         This command is very important..but very easy to learn.  This
  4. is the method you would use to specify how long your "LOOK"
  5. statements should actually look for the target string..and what macro
  6. id should be executed if the "LOOK" times out.  Optionally, you can
  7. specify a string to send if there's a period of inactivity (no
  8. characters received) while the macro is waiting for the specified
  9. prompt.  A "period of inactivity" could mean an unexpected prompt has
  10. shown up..no characters are coming in because the BBS is waiting for
  11. a response to the unexpected prompt.  Normally, one would specify a
  12. carriage return be sent during the optional timeout period.
  13.  
  14.         There are two ways you can use "SETL" -- "globally" or
  15. "locally".  By "globally", I mean you specify your SETLook parameters
  16. only one time in the script..somewhere near the beginning..or at
  17. least somewhere before the first "LOOK" occurs.  This parameters
  18. specified by this single SETLook would be used by all subsequent LOOK
  19. commands.  By "locally", I mean you can specify SETLook parameters
  20. for individual LOOK commands.  An example of a "global" use would be:
  21.  
  22. {:ID1}
  23.    {SETL 60,goodbye,5,|}
  24.    {LOOK prompt1}
  25.    .
  26.    .
  27.   {:ID1A}
  28.    .
  29.    {LOOK prompt2}
  30.    .
  31.   {:ID1B}
  32.    .
  33.    {LOOK prompt2}
  34.  
  35. Example of "local" would be:
  36.  
  37. {:ID1}
  38.    {SETL 60,goodbye,5,|}
  39.    {LOOK prompt1}
  40.    .
  41.    .
  42.   {:ID1A}
  43.    {SETL 30,nogo}
  44.    {LOOK prompt2}
  45.    .
  46.   {:ID1B}
  47.    {SETL 45,thisone,20,n|}
  48.    {LOOK prompt2}
  49. ---------
  50.         Personally, I prefer to tailor the SETLook variables for
  51. individual LOOK statements because different points in a BBS session
  52. mean different expected times for prompts to come in.  For example,
  53. the mail fetch/pack routine can take a relatively long time
  54. (especially if the BBS has a lot of conferences to scan..or if the
  55. BBS is running on a slow machine).  The "First Name?" prompt, though,
  56. might come in relatively fast.  I don't want to set a default timeout
  57. period which is based on the longest time for a prompt to appear
  58. because this could result in my remaining on line longer than I need
  59. to be if the script "hangs" for some reason.
  60.  
  61.         Bottom line, though..if you have even a single "LOOK" in your
  62. script, you should have at least one SETLook..
  63.  
  64. Jim
  65.