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

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