home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1995 November / PCWK1195.iso / esker / emul.1 / EMUL.ARC / SYSADMSH.MAC < prev    next >
Text File  |  1994-07-27  |  984b  |  48 lines

  1. # Characters sent by Host computer not displayed
  2. Hide
  3.  
  4. # Start
  5. Label BEGIN
  6. # Read login and password 
  7. ReadVar "Enter your user name : " USER
  8. ReadPasswd "Enter your password : " PASSWD
  9.  
  10. # Make connection
  11. Repeat 3
  12. # Send carriage-return character
  13.     Repeat 5
  14.         SendAndReceive 1 "\n" "ogin"
  15.         Pause 1
  16.         IfNoError break
  17.     end
  18.     IfError NOCONNECTION
  19.  
  20. # Send login
  21.     SendAndReceive 15 "%USER\n" "assword" "# "
  22.     IfError continue
  23.     IfEqual "# " break
  24.     SendAndReceive 15 "%PASSWD\n" "# " "ogin:" "ERM"
  25.     IfError continue
  26.     IfEqual "# " break
  27.  
  28. # Return to start of  program if login incorrect
  29.     IfEqual "ogin:" BEGIN
  30. # Set the TERM variable if necessery
  31.     SendAndReceive 15 "\n" "# "
  32.     IfError continue
  33.     IfEqual "# " break
  34. end
  35. # Start application
  36. Send "sysadmsh\n"
  37. # Display received characters
  38. Display
  39. # Return to the emulator
  40. Return
  41.  
  42. # No login 
  43. Label NOCONNECTION
  44. Echo "Communication failed"
  45. ReadVar "Press Return to quit" ANSWER
  46. # Exit the emulator
  47. exit
  48.