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

  1. # Characters sent by Host computer not displayed
  2. Title "File Transfert"
  3.  
  4. # Start
  5. Label BEGIN
  6. # Read password 
  7. ShowMessage
  8. ReadPasswd "Enter your password : " PASSWD
  9. HideMessage
  10.  
  11. # Make connection
  12. Repeat 3
  13. # Send carriage-return character
  14.     Repeat 5
  15.         SendAndReceive 5 "\n" "ogin"
  16.         Pause 1
  17.         IfNoError break
  18.     end
  19.     IfError NOCONNECTION
  20.  
  21. # Send login
  22.     SendAndReceive 9 "root\n" "assword" "# "
  23.     IfError continue
  24.     IfEqual "# " break
  25.     SendAndReceive 9 "%PASSWD\n" "# " "ogin:" "ERM"
  26.     IfError continue
  27.     IfEqual "# " break
  28.  
  29. # Return to start of  program if login incorrect
  30.     IfEqual "ogin:" BEGIN
  31. # Set the TERM variable if necessery
  32.     SendAndReceive 9 "\n" "# "
  33.     IfError continue
  34.     IfEqual "# " break
  35. end
  36. # Start application
  37. Set FILE "VT220.*"
  38. RcopyPut c:\\TUNEMUL\\VT220.* /tmp
  39. IfError TRANSFERTERROR
  40. Set FILE "ANSI.SEQ"
  41. Pause 15
  42. RcopyPut c:\\TUNEMUL\\ANSI.SEQ /tmp
  43. IfError TRANSFERTERROR
  44.  
  45. # Transfert done
  46. ShowMessage
  47. ClearMessage
  48. Echo "Transfert Done" 
  49. Sleep 3
  50. # Exit from the emulator
  51. Exit
  52.  
  53. #Transfert error
  54. Label TRANSFERTERROR
  55. ShowMessage
  56. Echo "Error Transfering %FILE"
  57. ReadVar "Press Return to quit" ANSWER
  58. # Exit the emulator
  59. exit
  60.  
  61.  
  62. # No login 
  63. Label NOCONNECTION
  64. ShowMessage
  65. Echo "Communication failed"
  66. ReadVar "Press Return to quit" ANSWER
  67. # Exit the emulator
  68. exit
  69.