home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / ENTERPRS / CPM / TERMS / QT41D128.LZH / QTERM.DOC < prev    next >
Text File  |  1989-04-06  |  27KB  |  494 lines

  1. If QTERM is invoked with no arguments, it starts up, and after signing
  2. on, you are immediately connected with the modem. If an argument file
  3. is provided, then it is assumed to be a chat script (see 'X'), and the
  4. chat script is immediately activated. With this file as with all others
  5. that can be entered, user numbers can be included in the filespecification:
  6. B3:CHAT.XYZ will look for the file in user area 3 on drive B: Either the
  7. drive or the user alone can be given: A:FOO.FOO and 7:BAZ.BAR are both
  8. acceptable, anything not given defaults to the current values. On
  9. completion of the chat script, command passes to normal connected
  10. operation. All special actions are initiated by typing the escape
  11. character, what happens next is determined by the next character typed.
  12. Note that while all letters here are shown in upper case, lower case works
  13. equally well: so <escape> b also activates the code to set the baud rate.
  14. As delivered, the escape character is set to control backslash, however it
  15. can be changed by patching QTERM: see QTERM.PAT for details, so to print
  16. help type '^\' '?', etc. In all the descriptions that follow, references to
  17. the escape character refer to this (i.e. '^\' and not the ESC key - '^[')
  18.  
  19.  
  20. Retyping the escape character (i.e. typing it twice) sends a single copy
  21. of the escape character to the remote system.
  22.  
  23.  
  24. Other characters and what they do are:
  25.  
  26. ? - Print help - QTERM provides a brief synopsis of the available commands.
  27.  
  28. . - Send a break - If QTERM has been patched to do it, this will transmit
  29.     a tenth of a second break.
  30.  
  31. , - Hang up modem - This is done by deactivating DTR for a short time, which
  32.     causes most modems to hang up. Again QTERM has to be patched to do this.
  33.     Alternatively, if your modem doesn't respond to DTR, it is possible to
  34.     have QTERM transmit a string to cause a hangup: for example the
  35.     '<delay> +++ <delay> ATH0'
  36.     as required by a HAYES compatible modem.
  37.  
  38. B - Change baud rate and mode - This will first prompt you, your response
  39.     must look like the following:
  40.  
  41.     nnnn
  42.     nnnn mmm -x y z
  43.     * mmm
  44.  
  45.     where 'nnnn' is a number specifying the baud rate. Up to eight options
  46.     are available: 300 600 1200 2400 4800 9600 19200 and 38400, although not
  47.     all of these may be enabled. 'mmm' is a byte format specifier made up
  48.     of three characters. The first must be '7 ' or '8' to specify the number
  49.     of data bits; the second 'E', 'O', or 'N' for even, odd, or no parity;
  50.     and the third '1' or '2' for the number of stop bits. The * in the last
  51.     example is used as a place holder when the mode is to be changed, but
  52.     not the baud rate. So, for example: '1200' would change to 1200 baud
  53.     leaving the mode as is; '300 8n1' would switch to 300 baud, and select
  54.     8 data bits, no parity, and 1 stop bit; and '* 7E2' would change the
  55.     format to 7 data bits, even parity, and 2 stop bits, while leaving the
  56.     baud rate alone. The '-' option is a way of specifying three delays
  57.     that can be set. The first is a delay in seconds after a control S is
  58.     sent. QTERM uses ^S / ^Q as flow control, to turn off transmission at
  59.     the remote end while it is writing to disk or the printer (see 'C' catch
  60.     and 'O' printer output). Since some systems take longer to respond to a
  61.     ^S than others, the delay time can be changed. QTERM starts up with one
  62.     second of delay, but by specifying -3 or -6 or whatever, this delay can
  63.     be changed. -0 is possible, but not recommended unless your remote system
  64.     responds instantly. The second number is a delay in milliseconds between
  65.     character sends in 'P' transmits (see below). Note that this time is
  66.     the time between the start of each character transmission, rather than
  67.     a time between the end of one and the start of the next. So if this
  68.     delay was set to 15 milliseconds at 1200 BPS, where each character
  69.     takes about 8 milliseconds to transmit, there would be 8 milliseconds
  70.     spent sending the character, and then 7 milliseconds of idle time: the
  71.     total being 15. The third number is the delay at the end of a line in
  72.     'P' transmission: this is also a count of milliseconds, and this delay
  73.     occurs after transmission of a carriage return. Note that it is possible
  74.     to selectively set these values: if a '*' is entered as a place holder
  75.     then the delay value for that position will not be changed, i.e.
  76.  
  77.     -* 20
  78.  
  79.     would leave the ^S delay alone, set the character delay to 20
  80.     milliseconds, and leave the end of line delay alone. Note that while
  81.     the 'nnn' option for setting the communication mode requires a place
  82.     holder, the -x option is detected by the '-'. Hence no place holder
  83.     is needed, but the -x must be the last thing on the line. So:
  84.  
  85.     300 -2 * 200
  86.     * 7o2 -1 15
  87.     -4 20 300
  88.  
  89.     are all acceptible commands, but:
  90.  
  91.     2400 -2 8n1
  92.  
  93.     will set the baud rate to 2400, the ^S delay to 2 seconds, but will not
  94.     change the communication mode. Instead it would do undefined things to
  95.     the character and end of line delays. Although QTERM always claims to
  96.     have made the changes to the baud rate and communication mode, they will
  97.     only happen if the necessary patches are applied. Note that for the
  98.     second character of the mode specifier, both lower and upper case are
  99.     accepted.
  100.  
  101. C - Open an input catch file - This prompts for a filename, and then opens
  102.     that file for output. All subsequent data received up the line from the
  103.     modem port will be written to the file.
  104.  
  105. Y - Put catch file on hold - This keeps the output file open, but temporarily
  106.     disables transfer of data. A second <escape> 'Y' will re-enable capture
  107.     of data.
  108.  
  109. Z - Close a catch file - This closes the output file, and disables data
  110.     capture until another catch file is opened.
  111.  
  112. D - Display local directory - This prompts for a single CP/M wildcard
  113.     file specificier, and then lists all files that match. Note that an
  114.     empty filename is assumed to be '*.*'. This option will only work
  115.     with CP/M 2.2 and compatible systems: it is disabled under CP/M 3.0.
  116.     When the files are being printed, QTERM will stop after each screenful
  117.     (23 lines), hitting return will print a single line, any other key will
  118.     print a full page.
  119.  
  120. E - Toggle remote echo - This toggles echo to the remote system. This will
  121.     most likely be used when the remote system is a terminal or another
  122.     computer running a terminal program. It causes all characters received
  123.     from the modem to be re-transmitted back to the modem, creating the
  124.     impression that the far end is running in half duplex mode. Caution
  125.     should be used to make sure that you don't set up an 'infinite loop'
  126.     where the remote system is also echoing: because then the first
  127.     character that returns will be sent out again by QTERM, to be returned
  128.     by the remote, to be sent out again by QTERM .....
  129.     
  130. H - Toggle half duplex - This simply causes all keyboard input to be
  131.     echoed to the screen.
  132.  
  133. I - Print status Information - This prints a summary of QTERM's current
  134.     state, showing the state of the various toggles, delays, what the
  135.     current drive and user are, etc.
  136.  
  137. J - Junk control characters - This causes QTERM to discard all control
  138.     characters received from the remote system that are not considered
  139.     important. Important control characters are: carriage return (0x0d);
  140.     linefeed (0x0a); backspace (0x08); tab (0x09); and escape (0x1b).
  141.     In this mode, if the remote system is sending characters with the
  142.     MSB set, and bit 7 masking is not enabled (see 'M'), then all
  143.     characters with bit 7 set will also be discarded.
  144.  
  145. L - Toggle linefeed transmit for 'P' - When 'P' is used to send a file to
  146.     the remote system, it normally transmits all useful characters: i.e.
  147.     all printable ascii characters from ' ' to '~', tabs, and carriage
  148.     returns. This toggle ensables the transmission of line feeds, for
  149.     cases where it is needed. Note that when QTERM starts, this is off,
  150.     i.e. the default is not to transmit linefeeds.
  151.  
  152. M - Toggle bit 7 mask - When this is enabled, all characters received from
  153.     the remote have the most significant bit stripped. This may be useful
  154.     when QTERM is running in 8n1 mode, but the remote is transmitting in
  155.     7e1 mode - the top bit will contain parity, and this strips it off.
  156.  
  157. N - New default drive and user. This will prompt, and allow entry of a drive
  158.     user specification (i.e 'A7:' or 'B14:' or 'C:' or '9:'), this then
  159.     becomes the default for all file operations. Note that it is possible
  160.     to user the CP/M BDOS functions to set drive and user during the entry
  161.     hook code (see QTERM.PAT), so if the entry code selects D2:, and all
  162.     scripts are on D2: just entering QTERM SCRIPT at the CCP prompt would
  163.     find SCRIPT on D2:. Also note that after the entry hook code, QTERM makes
  164.     a note of where it is (i.e. in the above case D2: ) When a chat script
  165.     is invoked with the 'X' command, QTERM will first look at the drive
  166.     given, or on the default if no drive is specified. If that fails, then
  167.     QTERM will take a second look in the drive/user area as saved after the
  168.     entry hook. The rationale behind this is to place all chat scripts in
  169.     one place: these can subsequently move the default around (see the '!'
  170.     section of chat scripts), or 'N' commands can be used to move around.
  171.     However it does not matter what the current default drive/user is, QTERM
  172.     can always find the scripts by lookng back at the area it noted.
  173.  
  174. O - Toggle output to the printer - This simply toggles a switch that causes
  175.     all data received to be transmitted to the printer.
  176.  
  177. P - Print a file to remote - This prompts for a filename, and then transmits
  178.     that file to the remote system. While this transfer is in progress, the
  179.     keyboard is ignored, except that typing control 'X' will cancel the
  180.     transfer. Note that the 'L' command may come in useful with this command,
  181.     check how your remote system behaves.
  182.  
  183. T - Type a local file - This also prompts for a filename, and then prints that
  184.     file to the screen locally. While this is in progress, a control 'X' will
  185.     cancel it, Output can also be paused by typing control 'S', which will
  186.     halt until another character is typed. If this character is control 'X'
  187.     the output will be aborted, any other continues the printout.
  188.  
  189. V - Toggle VT100 emulation. This function requires the following screen
  190.     abilities be specified before it will work (see QTERM.PAT for details):
  191.     clear to end of line, and clear to end of screen. Note that the VT100
  192.     emulation is as complete as it can be, however the alternate character
  193.     sets and display attribute commands will not be recognised.
  194.  
  195. W - Toggle split window mode. This requires that the insert line and delete
  196.     line screen abilities be specified (see QTERM.PAT for details). It puts
  197.     QTERM into a mode where send and receive text are shown in two separate
  198.     windows. This can be useful when using QTERM to communicate with another
  199.     communication program running in terminal mode, because it keeps what
  200.     is typed on the keyboard separate from what is received from the remote
  201.     system. After selecting window mode, QTERM prompts for window size: there
  202.     are two options, 'b' or 's' (big or small). This refers to the receive
  203.     window: when small, the screen is split exactly in half: 11 lines for
  204.     both send and receive. Big mode makes the receive window 18 lines deep,
  205.     the send window is only 4 lines: this will be useful when far more text
  206.     is being received than is being sent.
  207.  
  208. R - Receive a file using protocol - This option prompts for a mode and
  209.     optional receive file information. Xmodem and Kermit are both supported.
  210.     Respond with 'k' to go into Kermit receive, or 'x' to go into Xmodem
  211.     receive. Normally files are received on the current default drive,
  212.     however by entering a drive or a user (e.g. 'k b7:') files will be
  213.     received in the specified location. In addition, if Xmodem is not
  214.     being used in batch mode, a filename can be given here. Non-batch
  215.     Xmodem has a default filename, this can be used to override it. Note
  216.     that a space MUST be present between the k or the x and the
  217.     filename / drive specification for proper operation. Normally QTERM
  218.     is silent, however if an 'a' option is given immediately after the
  219.     'x' or 'k' (as in 'ka c4:') QTERM will alert on termination of transfer
  220.     by ringing the terminal bell. While the transfer is in progress, a
  221.     control 'X' will abort it.
  222.  
  223. S - Send a file using protocol - This also prompts, the response should be
  224.     'k filelist ....' or 'x filelist ....' where 'filelist ....' is a list
  225.     of CP/M filespecifiers: wildcards are permitted. Single filespecifiers
  226.     are separated from one another by spaces, and there must be a space
  227.     before the first filespecifier. There are options that can be given
  228.     immediately following the k / x. For Kermit, the only option available
  229.     is a 'b' that forces binary mode. Kermit usually sends files in text
  230.     mode (i.e. 0x1a is taken as end of file) - If you want to transfer a
  231.     binary file, specify the mode as 'kb filename.com'. Xmodem has the
  232.     following options: 'b' - use Xmodem batch (AKA Modem7 batch mode);
  233.     'y' - use Ymodem batch mode; 'k' - use 1K packets. So 'xbk a12:*.com'
  234.     would send all .COM files on drive A:, user area 12, using Modem7
  235.     batch mode and 1K packets. To match names to various combinations:
  236.     xyk will give true Ymodem (known sometimes as ymodem batch), xk gives
  237.     Xmodem 1K (sometimes incorrectly called ymodem), xy gives Ymodem batch,
  238.     but forces 128 byte packets, xbk will use Modem7 batch mode, but with
  239.     1K packets. Note that the Kermit implementation can attempt to use both
  240.     hi bit quoting and repeat character packing for sending, these are
  241.     enabled by adding a 'p' to the kermit options for pack, and a 'h' for
  242.     high bit quoting. As with protocol reception, this procedes in silence,
  243.     however if an 'a' option (i.e. 'xkya 4:*.txt') is given, QTERM will
  244.     ring the bell on completion; in addition, a control 'X' will abort the
  245.     transfer.
  246.  
  247. K - Program a function key - This prompts for a key number and a string
  248.     to be loaded under that key. The first character entered may be an
  249.     's' to specify the string should be sent slowly. Normally function
  250.     key strings are transmitted at full speed, however the 's' creates
  251.     a tenth second delay between characters. Following the 's' (if given)
  252.     or as the first character if no 's' is given, must be a digit between
  253.     '0' and '9': this specifies the key number. Finally comes the string
  254.     that will be loaded under the key. Maximum string length is 14
  255.     characters, longer strings are truncated. Backslash escape sequences
  256.     are permitted, see the description in the section on chat scripts
  257.     for a full explanation of what is available. As a few examples:
  258.  
  259.     s2hello\r
  260.  
  261.     would program function key 2 to send 'hello <cr>' slowly, and:
  262.  
  263.     3userid = 17\e
  264.  
  265.     would program function key 3 to send 'userid = 17 <esc>' at full speed.
  266.     (\r is an escape sequence that maps to a single carriage return, and
  267.     \e maps to a single escape. See chat scripts below for more detail)
  268.  
  269. 0-9 - Send function key string - After <escape> 'K' has been used to load
  270.     strings into the function keys, <escape> '0' etc. will activate the
  271.     function key, causing the string it contains to be sent.
  272.  
  273. X - Activate a chat script - This prompts for a filename, then it reads the
  274.     file, and does the chat script given. A chat script is a means for
  275.     getting QTERM to automatically call up a remote system, log in to it,
  276.     and do whatever else in wanted. A line in a chat script contains six
  277.     fields: an example of such a line is:
  278.  
  279.     .AT\r.OK\r\n.3.2.3.0.
  280.  
  281.     In this example the '.' (first character) is the delimiter used to
  282.     separate fields. Any character can be used, but whatever character is
  283.     chosen cannot appear in the strings. Also note that chosing a delimiter
  284.     from the characters above 'z' in the ASCII character set
  285.     (i.e. '{', '|', '}', and '~') has a special effect, which is explained
  286.     below. Taking the fields in order they are SEND, EXPECT, TIME, TRIES,
  287.     SUCCESS, and FAIL. SEND is a string that is transmitted by QTERM, so in
  288.     the example above QTERM would transmit 'AT<carriage return>'. Since the
  289.     file must be printable ascii, special escape sequences are provided to
  290.     allow arbitrary characters in. All of these escape sequences start with
  291.     a backslash '\', and the following are provided: '\r' carriage return
  292.     (0x0d), '\n' linefeed (0x0a), '\t' tab (0x09) '\b' backspace (0x08),
  293.     '\e' escape (0x1b), '\k' break, and '\d' delay. '\k' causes a break to
  294.     be sent, and '\d' causes a delay of two seconds in the transmission.
  295.     In addition a backslash can be followed by up to three octal digits to
  296.     send the character with that representation: so '\177' would send a
  297.     delete, and '\003' or '\3' would send a control C; this can also be
  298.     done for hexadecimal representations: in this case '\x' is the leadin,
  299.     and it is followed by up to two hexadecimal digits: so '\x7f' would
  300.     again send a delete, and '\xd' could be used in place of '\r' to send
  301.     a carriage return. The rule for determining how many characters are
  302.     used when scanning an octal or hex number is as follows: octal has a
  303.     maximum of three, hex a maximum of two: use at most that many characters,
  304.     or stop early if an inappropriate character is encountered. As was noted
  305.     above, delimiters above 'z' have a special effect: they cause the SEND
  306.     string to be written out slowly: there is a tenth of a second delay
  307.     after each character. EXPECT is a string that QTERM is looking for in
  308.     response to it's SEND string: so in the above example, QTERM would be
  309.     looking for the 'OK<carriage return><linefeed>' that a Hayes compatible
  310.     modem would respond with, when presented with the 'AT<return>' that
  311.     QTERM sent.
  312.  
  313.     The remining four fields are all decimal numbers, and can be omitted
  314.     as QTERM will provide default values. TIME is the number of seconds
  315.     to wait before assuming failure, if not given it defaults to 15. TRIES
  316.     is the number of times to retry on failure, so taking our first example,
  317.     TRIES is 2. If it matched the EXPECT string on the first sending of SEND,
  318.     all is well, but on the first failure it would resend the SEND string
  319.     and look for the EXPECT string a second time. If it failed on this second
  320.     attempt, only then would it consider this line to have failed. SUCCESS
  321.     specifies the line number to transfer to in the chat script if it matched
  322.     the EXPECT string. The default for this is the line following the current
  323.     line. FAIL is the line to transfer to if the EXPECT string is not
  324.     matched. This can be a line in the chat script, or as shown above 0 is
  325.     allowed, which terminates the script immediately. In another example, if
  326.     the first line were:
  327.  
  328.     .AT\r.OK\r\n..5.
  329.  
  330.     Since TIME is empty, it defaults to 15, but as TRIES is 5, this line
  331.     would try five times before giving up. Note also from the second
  332.     example that there are two ways of causing QTERM to default a value:
  333.     an empty field (TIME) or end of the string (SUCCESS and FAIL). Note
  334.     however that the closing '.' after the 5 for TRIES is necessary. It is
  335.     possible that either of SEND or EXPECT can be empty: an empty SEND
  336.     causes nothing to be sent, but the EXPECT must be matched to continue;
  337.     an empty EXPECT automatically matches. Note that if both are empty then
  338.     the chat script will terminate when it hits that line.
  339.  
  340.     There is another special cases for the "delimiter": '!'. This allows
  341.     other <escape> commands to be executed in the middle of a chat script.
  342.     Following the '!' must be the letter of the command to be executed,
  343.     and following this must be any input that would normally be prompted
  344.     for. Hence:
  345.  
  346.     '!b1200 8n1'
  347.  
  348.     would cause the baud rate to be set to 1200, and the communications
  349.     mode to 8 data bits, no parity, and one stop bit; likewise:
  350.  
  351.     '!.'
  352.  
  353.     would send a break. Note that there should be no space between the '!'
  354.     and the command letter, although spaces after are permitted. Not all
  355.     commands are available: ',', '.' (hangup and break), 'B' (set baud
  356.     rate), 'E' (set local echo), 'H' (set half duplex), 'J' (toggle
  357.     junking control characters), 'L' (set linefeed send for 'P'), 'M' (set
  358.     bit 7 mask), 'N' (select new drive/user), 'V' (toggle VT100 emulation),
  359.     'W' (toggle split window mode), 'K' (program function key), 'P' (print
  360.     file to remote), 'R' (receive), 'S' (send) and 'X' (activate chat script)
  361.     are the only commands available. Note also that the toggles ('E', 'H',
  362.     'J', 'L', 'M', 'V' and 'W') behave a little differently. Since the state
  363.     of these toggles is not defined when a chat script starts, there are
  364.     three ways of invoking these. Using 'H' (half duplex) as an example:
  365.  
  366.     '!h'
  367.  
  368.     behaves as would an <escape> 'H' in normal operation, i.e. it toggles
  369.     the half duplex switch. However, if the following is given:
  370.  
  371.     '!h1'
  372.  
  373.     the trailing '1' forces half duplex to be enabled, irrespective of
  374.     it's original state, and:
  375.  
  376.     '!h0'
  377.  
  378.     guarantees to turn half duplex off. The other toggles work in the same
  379.     manner: a trailing '0' always disables, and a trailing '1' always
  380.     enables.
  381.  
  382.     The 'X' command to activate a chat script can be used to chain scripts
  383.     together: when an 'X' is encountered the specified chat script is
  384.     invoked, however the current script is lost: it is overwritten by the
  385.     new one.
  386.  
  387.     There are two other command that are not normally available: 'A', and
  388.     'F'.
  389.  
  390.     'A' simply alerts it's passing by ringing the terminal bell, this may
  391.     be useful if a chat script is being used to repeatedly call a number
  392.     until a connection is made: by putting a '!a' into the script, the
  393.     system will beep when a connection is made.
  394.  
  395.     Since 'C' catch files are disabled during chat script operation, 'F'
  396.     is provided as an alternative means for data capture. A typical 'F' line
  397.     would be:
  398.  
  399.     '!fb:catch.txt 6 string'
  400.  
  401.     This would open B:CATCH.TXT for output, then send 'string' out, and
  402.     transfer all subsequent data to that file until a timeout of 6 seconds
  403.     occurred. 'string' is a string that can contain backslash escape
  404.     sequences, just like a SEND string in normal chat operation. Any
  405.     timeout can be given, up to about 250 seconds. Note that since this
  406.     uses the same buffer as the <escape> C command, if there is already a
  407.     catch file open, it will be automatically closed prior to execution
  408.     of a '!f'.
  409.  
  410.     Finally, if you wish to terminate a chat script prematurely, typing
  411.     control 'X' will do so, and return to normal operation.
  412.  
  413. Q - Quit - This terminates QTERM, returning to CP/M. Note that the modem is
  414.     not hung up, unless the exit code explicitly does so, or an <escape> ','
  415.     sequence is used before terminating QTERM.
  416.  
  417.  
  418. To finish - here is an example of a chat script, with a 'blow by blow' account
  419. of every line.
  420.  
  421. !b1200 8n1 -2 25 500            [1]
  422. !k0C;CP/M\r                [2]
  423. !k1C;POST\r                [2]
  424. .AT\r.OK\r\n..5.            [3]
  425. .ATDT1234567\r.CONNECT 1200.30.        [4]
  426. ..inue: .                [5]
  427. .\r.\r\n.                [6]
  428. .\013.name: .                [7]
  429. |david goodenough\r|word: |        [7]
  430. |XXXXXXXX\r||                [7]
  431.  
  432. [1] - set the baud rate for 1200, and 8n1 as the communications mode, set
  433.     for 2 seconds delay to respond to ^S, set for 25 milliseconds
  434.     delay between character sends during <escape> P and set for 500
  435.     milliseconds of delay at the end of each line in <escape> P
  436.  
  437. [2] - load function key 0 with 'C;CP/M <return>', and function key 1 with
  438.     'C;POST <return>' - these are a couple of commands that I use a
  439.     lot on the BBS associated with this chat script.
  440.  
  441. [3] - send 'AT<return>' to the modem, and look for the 'OK<return><linefeed>'
  442.     response. This line is tried five times before giving up.
  443.  
  444. [4] - dial the number, and wait for the 'CONNECT 1200' response. Note here
  445.     that the timeout is thirty seconds, to give the modem time to dial,
  446.     make the connection, and establish carrier with the other modem.
  447.  
  448. [5] - send nothing, but wait for 'inue: '. This is part of a string typed
  449.     by the BBS: 'Hit any key to continue: ' - here we are just looking
  450.     for the last six characters. Note that all four numeric fields
  451.     default here, so wait 15 seconds, only try it once, success goes
  452.     to the next line, and failure exits,
  453.  
  454. [6] - send a <return>, and wait for a <return> <linefeed>.
  455.  
  456. [7] - send a control K ('\013'), and wait for 'name: '; then send my
  457.     name, and wait for 'word: ' (part of the password prompt);
  458.     finally send my password, and expect nothing - we're all done.
  459.     Note also the '|' delimiter, the system can't take the name
  460.     and password at full speed, so they are sent slowly.
  461.  
  462. To provide a second example, a local BBS has two possible numbers to
  463. call it on. The following script will try the first, if that fails
  464. then try the second
  465.  
  466. .AT\r.OK\r\n..5.            [1]
  467. .ATDT7654321\r.CONNECT 1200.30..5.3.    [2]
  468. .AT\r.OK\r\n..5.            [3]
  469. .ATDT7651234\r.CONNECT 1200.30.        [4]
  470. %\r%inue....%                [5]
  471. . .FIRST name? .            [6]
  472. .david\r.LAST name? .            [6]
  473.  
  474. [1] - Get the modem's attention: send AT <return> till the modem responds.
  475.  
  476. [2] - Try the first number. If we succeed go to line 5, on a fail go to line
  477.     3 which is the next line.
  478.  
  479. [3] - Resync with the modem.
  480.  
  481. [4] - Try the second number. If we succeed, carry on, otherwise fail.
  482.     Effectively failure only occurs if both numbers don't work.
  483.  
  484. [5] - Start the login process, this line shows also how any delimiter can
  485.     be used: since '.' is part of the expect string there is another
  486.     character in use for the delimiter.
  487.  
  488. [6] - Continue logging in.
  489.  
  490. By expanding the process above, it is possible to cause the modem to test
  491. many numbers, and by suitably adjusting the failure value of the last
  492. line where a number is dialed it is possible to make the script try several
  493. numbers in a loop test pattern indefinitely till one of them succeeds.
  494.