home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / comm / term33in.lha / Rexx / Autologin.term next >
Text File  |  1993-02-02  |  2KB  |  74 lines

  1. /** $VER: Autologin.term 1.1 (2.2.93)
  2.  **
  3.  ** Perform auto-login procedure for a BBS or
  4.  ** mail server.
  5.  **
  6.  ** Written by Olaf `Olsen' Barthel
  7.  **
  8.  ** In order to install this program, open the phone book,
  9.  ** select the phone book entry to use this program,
  10.  ** open the `Commands...' settings and enter the following
  11.  ** text under `Startup-/Login macro':
  12.  **
  13.  **    \a Autologin <Name prompt>,<Password prompt>
  14.  **
  15.  ** Don't type the words enclosed in angle brackets, but rather
  16.  ** add the texts the remote expects when the user is to enter
  17.  ** her/his name and the password to be used. So, for example,
  18.  ** if the BBS prompts with `Login:' to enter your user
  19.  ** name and `Password:' to enter your password one would use:
  20.  **
  21.  **    \a Autologin Login:,Password:
  22.  **
  23.  ** Type the line exactly as shown in the template, and do not
  24.  ** omit the comma!
  25.  **
  26.  ** Now edit the `User/Password...' settings to contain your
  27.  ** user name and password.
  28.  **
  29.  ** Now save the phone book to a file, and don't forget to
  30.  ** copy this file to the "REXX:" drawer.
  31.  **/
  32.  
  33.     /* Set the read timeout to ten seconds. */
  34.  
  35. TIMEOUT 10
  36.  
  37.     /* Read the two calling parameters. */
  38.  
  39. PARSE ARG userprompt ',' passwordprompt
  40.  
  41.     /* Wait for the user name prompt to appear. */
  42.  
  43. WAIT userprompt
  44.  
  45.     /* Did the prompt appear? If not, drop out immediately. */
  46.  
  47. IF rc ~= 0 THEN EXIT
  48.  
  49.     /* Wait a second... */
  50.  
  51. DELAY 1
  52.  
  53.     /* Send the user name, adding a <carriage return> character. */
  54.  
  55. SEND '\u\r'
  56.  
  57.     /* Wait for the password prompt to appear. */
  58.  
  59. WAIT passwordprompt
  60.  
  61.     /* Did the prompt appear? If not, drop out immediately. */
  62.  
  63. IF rc ~= 0 THEN EXIT
  64.  
  65.     /* Wait a second... */
  66.  
  67. DELAY 1
  68.  
  69.     /* Send the password, adding a <carriage return> character. */
  70.  
  71. SEND '\p\r'
  72.  
  73.     /* That's all folks! */
  74.