home *** CD-ROM | disk | FTP | other *** search
/ Computerworld Gratis 30 Hours of Connection / Image(2).iso / infovia / win31 / simple.sc_ / simple.sc
Text File  |  1994-06-08  |  1KB  |  27 lines

  1. <* Example SLANG script              11 Mar 94                language=slang
  2.  * This script is an example of a simple login session.
  3.  *
  4.  * Change "klingon" to a string the host you want to log into transmits
  5.  * when you make a connection.  And change 0000 to your modem's phone number.
  6.  *
  7.  * Change foo-slip to your slip userid.
  8.  *>
  9.  
  10. (define,login,{                         <**** routine to connect to net ***>
  11.     (send,ATDT0000(cr))                           <* dial the phone       *>
  12.     (define,data,(receive,30000,login:))          <* read from seial line *>
  13.     (has,data,klingon,{                           <* is this correct host?*>
  14.         (send,foo-slip(cr))                       <* yes: send userid     *>
  15.         (define,data,(receive,30000,Password:))   <* look for "password"  *>
  16.         (has,data,password,{                      <* did we get prompt?   *>
  17.             (conecho,off)                         <* turn off kebd echo   *>
  18.             (send,(output,{password please?  })(input)(cr))  <* yes       *>
  19.         })
  20.     })
  21. })
  22.  
  23. (login)                                   <* perform the login            *>
  24. (output,(receive,2000))                   <* output any residual messages *>
  25.  
  26. <* End of example *>
  27.