home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / COMM / MISC / CUTCP.ZIP / SAMPLE2.SCR < prev    next >
Encoding:
Text File  |  1990-06-22  |  2.1 KB  |  71 lines

  1. flags debug
  2. timeout 60
  3. ; This is a second script sample, showing how to connect to multiple
  4. ; systems with one script file.
  5. telnet omnigate
  6. waitfor connection
  7. flags nocase
  8. lookfor Login
  9. write "myname\r"        ; this is my account (not really)
  10. lookfor "Password"
  11. write "mypassword\r"        ; this is my password (not really silly)
  12. lookfor "-->"        ; this is my prompt
  13. message "Connected to Omnigate Ok"
  14. detach
  15. telnet clutx.clarkson.edu
  16. waitfor connection
  17. lookfor Login
  18. write "myname\r"
  19. lookfor "Password"
  20. write "mypassword\r"
  21. lookfor "-->"        ; don't you love my prompt... 
  22. message "Connected to Clutx ok"
  23. detach
  24. ; now lets rlogin to sun.soe
  25. rlogin sun.soe
  26. waitfor connection
  27. lookfor assword
  28. write "mypassword\r"        ; also not my password
  29. message    "Connected to Sun.soe ok"
  30. detach
  31. ; now, lets go back to omnigate and re-attach, then do an ftp
  32. attach "omnigate"
  33. flags debug
  34. echo "\e[2J\e[H"            ; clear the window
  35. flags nodebug
  36. message "\e[2J\e[H"            ; clear the console
  37. show console                ; lets display the console while we
  38.                     ; draw this stuff out.
  39. message "\e(0"                ; go to line drawing mode
  40. message "lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk\n"
  41. message "x                                                                x\n"
  42. message "mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj"
  43. message "\e(A"                ; turn back to normal chars
  44. message "\e[2;3H"            ; move cursor into box for prompt
  45. onerror forgetit
  46. ; if the user presses ESCAPE at the ask prompt, we generate an error that
  47. ; we can use to jump with.
  48. ask "Enter your FTP Userid (esc to Quit):"
  49. show console            ; the ask command will switch to the console
  50.                 ; for me, but it also restores the current
  51.                 ; view, so I switch it back to the console
  52.                 ; here
  53. message "\e[2;3H\e[0K\e[5mThanks!\e[0m\e[4;1H" ; pretty stuff here
  54. flags debug
  55. write "ftp "
  56. send myip
  57. write "\r"
  58. lookfor "Name"
  59. send ask
  60. write "\r"
  61. flags nocase
  62. lookfor "password:"
  63. send password
  64. write "\r"
  65. show current
  66. end
  67. label forgetit        ; person gets here if they pressed escape
  68. message "\e[2J\e[HFTP Aborted\n"
  69. show console
  70. end
  71.