home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / BBS / BBS2DRAG.ZIP / ROBOC430.ZIP / MESSAGE.RS < prev    next >
Text File  |  1995-02-10  |  2KB  |  78 lines

  1. ;╒═════════════════════════════════════════════════════════════════════╕
  2. ;│ File:    MESSAGE.RS - Robocomm 4.x script file                      │
  3. ;│ Author:  Dan Parsons                                                │
  4. ;│ Version: 1.1                                                        │
  5. ;│ Revised: 01/21/95                                                   │
  6. ;│                                                                     │
  7. ;│ Notes:   Requires that the PCBoard is using the "default" prompts.  │
  8. ;╘═════════════════════════════════════════════════════════════════════╛
  9. TITLE "ASCII Upload a message to PCBoard 14.5"
  10. PARAMETER 1 "Text file containing message            "
  11. PARAMETER 2 "Conference         (Empty=Main)"
  12. PARAMETER 3 "To                 (Empty=ALL)"
  13. PARAMETER 4 "Subject            (Required)"
  14. PARAMETER 5 "Security           (R=Private, N=Public)"
  15. PARAMETER 6 "Echo Message       (Y/N)"
  16. PARAMETER 7 "Erase after send   (Y/N)"
  17. ENDPARAMS
  18.  
  19. ; Validate parameters
  20. IF NOT EXIST "%P1%" GOTO NOFILE
  21. IF EMPTY "%P4%" GOTO NOSUBJECT
  22.  
  23. ; Get to correct conference to send message
  24. VENUE MAIN
  25. ; Turn of "terse mode" prompts
  26. TERSE OFF
  27.  
  28. IF EMPTY "%P2%" JOIN "0"
  29. IF NOT EMPTY "%P2%" JOIN "%P2%"
  30.  
  31. ; Enter the Message
  32. MESSAGE "Sending message file %P1% to %P3%"
  33. MESSAGE "  sec: %P5%  echo: %P6%  re: %P4%"
  34. SEND "E|"
  35. WHEN "TO (ENTER)"       SEND "%P3%|"
  36. WHEN "SUBJECT ("        SEND "%P4%|"
  37. WHEN "MESSAGE SECU"     SEND "%P5%|"
  38. WHEN "(ENTER)=Y?"       SEND "%P6%|"
  39. WHEN "USE FULL SCR"     SEND "N|"
  40. WHEN "(ESC) TO EXIT"    SEND "U|"
  41. WHEN "(ENTER) ALONE"    SEND "|U|"
  42. WAITFOR "UPLOAD MODE"
  43.  
  44. ; Upload the message
  45. UPLOAD "%P1%" USING "ASCII"
  46.  
  47. ; Save it
  48. SEND "||S|"
  49.  
  50. ;Make sure
  51. TIMEOUT 10
  52. WAITFOR "SAVING" FAILURE GOTO ERROR
  53. IF YES "%P7%" GOSUB KILLIT
  54. TERSE ON
  55. EXIT 0
  56.  
  57. :KILLIT
  58.     MESSAGE "Erasing message file %P1%"
  59.     ERASE "%P1%"
  60. RETURN
  61.  
  62. :ERROR
  63.     MESSAGE "ERROR: Undetermined error uploading the message"
  64.     SEND "A|||||"
  65.     TERSE ON
  66. EXIT 1
  67.  
  68. :NOSUBJECT
  69.     MESSAGE "ERROR: Missing message subject"
  70.     TERSE ON
  71. EXIT 1
  72.  
  73. :NOFILE
  74.     MESSAGE "ERROR: Unable to open message file: %P1%"
  75.     TERSE ON
  76. EXIT 1
  77.  
  78.