home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 May / PCWorld_2000-05_cd.bin / Software / Servis / crt303 / ntcrt303.exe / EXAMPLE3.VBS < prev    next >
Encoding:
Text File  |  1999-08-26  |  820 b   |  28 lines

  1. #$language = "VBScript"
  2. #$interface = "1.0"
  3.  
  4. Sub main
  5.   ' turn on synchronous mode so we don't miss any data
  6.   crt.Screen.Synchronous = True
  7.   
  8.   ' Wait for a string that looks like "login: " or "Login: "
  9.   ' Occasionally, a host needs to be kicked to display a
  10.   ' login prompt.
  11.   If (Not crt.Screen.WaitForString("ogin: ", 5)) Then
  12.     crt.Screen.Send vbCr
  13.     crt.Screen.WaitForString "ogin: "
  14.   End If
  15.   
  16.   ' Send your username followed by a carriage return
  17.   crt.Screen.Send "username" & VbCr
  18.  
  19.   ' Wait for a tring that looks like "password: " or "Password: "
  20.   crt.Screen.WaitForString "assword:"
  21.  
  22.   ' Send your password followed by a carriage return
  23.   crt.Screen.Send "password" & VbCr
  24.  
  25.   ' turn off synchronous mode for normal input processing
  26.   crt.Screen.Synchronous = False
  27. End Sub
  28.