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

  1. ;-----------------------------------------------------------------------
  2. ; POSTLINK.rs -- Robocomm script to do PCRelay mail runs on PCBoard
  3. ;                systems running the POSTLINK net-mail system.
  4. ;
  5. ;   Author: Dan Parsons
  6. ;  Version: 1.1 -- 12/19/94
  7. ;
  8. ;     NOTE: You may want to update the TIMEOUT value indicated below
  9. ;           if you have problems with Robocomm timing out while the
  10. ;           BBS is scanning.
  11. ;
  12. ;-----------------------------------------------------------------------
  13. TITLE "PostLink Mail run for PCBoard"
  14.  
  15.     PARAMETER 1 "Enter the PostLink door # or name"
  16.     PARAMETER 2 "Enter the door password (optional)"
  17.     PARAMETER 3 "Enter the path\name of the PREAMBLE"
  18.     PARAMETER 4 "Enter the path\name of U### file"
  19.     PARAMETER 5 "Enter the path\name of D### file"
  20.     PARAMETER 6 "Enter the conference to join first"
  21.     PARAMETER 7 "Hang up after D/L (Y=Yes/N=No)"
  22.     ENDPARAMS
  23.  
  24.     ; Check to make sure that our preamble and U### files exist where we
  25.     ; expect them to be
  26.     IF NOT EXIST "%P3%" GOTO NO_PREAMBLE
  27.     IF NOT EXIST "%P4%" GOTO NO_UFILE
  28.     IF EXIST "%P5%" GOTO DFILE_FOUND
  29.  
  30.     ; Want a special capture log of the session?
  31.     ; If so, un-comment the following line
  32.     CAPTURE "POSTLINK.LOG" OVERWRITE
  33.  
  34.     ; Set the timeout value on the next line to however many seconds you think
  35.     ; it might take for the BBS to start sending your D### packet:
  36.     TIMEOUT 360
  37.  
  38.     ; Get to the proper conference
  39.     VENUE MAIN
  40.     IF NOT EMPTY "%P6%" JOIN "%P6%"
  41.  
  42.     ; Send the door number
  43.     SEND "OPEN %P1%|"
  44.  
  45.     ; Send the password if one was eneterd
  46.     IF NOT EMPTY "%P2%" SEND "%P2%|"
  47.  
  48.     ; Watch for part of the Zmodem header
  49.     WAITFOR "PREAMBLE" FAILURE GOTO IM_LOST
  50.  
  51.     ; Send the preamble via internal Zmodem
  52.     UPLOAD "%P3%" USING "ZMODEM"
  53.     SEND "|"
  54.  
  55.     ; Watch for part of the Zmodem header
  56.     WAITFOR "*" FAILURE GOTO IM_LOST
  57.  
  58.     ; Send the U### packet via internal Zmodem
  59.     UPLOAD "%P4%" USING "ZMODEM"
  60.     SEND "|"
  61.  
  62.     ; Wait for the door to start sending the D### packet
  63.     WAITFOR "*" FAILURE GOTO IM_LOST
  64.  
  65.     ; Download the D### packet using internal zmodem
  66.     DOWNLOAD "%P5%" USING "ZMODEM"
  67.  
  68.     IF YES "%P7%" GOSUB END_CALL
  69.     IF NOT YES "%P7%" GOSUB STICK_AROUND
  70.  
  71.     CLOSE
  72.  
  73. EXIT 0
  74.  
  75. :END_CALL
  76.     SEND "H|"
  77.     DELAY 2
  78.     HANGUP
  79. RETURN
  80.  
  81. :STICK_AROUND
  82.     CLEAR
  83.     WAITFOR "PRESS SPACE BAR"
  84.     SEND " "
  85.     WAITFOR "DONE." FAILURE GOTO IM_LOST
  86.     VENUE MAIN
  87. RETURN
  88.  
  89. :IM_LOST
  90.     MESSAGE "! Timeout in script"
  91.     CLOSE
  92. EXIT 1
  93.  
  94. :NO_PREAMBLE
  95.     MESSAGE "! Unable to locate the %P3% (preamble) file."
  96. EXIT 1
  97.  
  98. :NO_UFILE
  99.     MESSAGE "! Unable to locate the %P4% (U###) file."
  100. EXIT 1
  101.  
  102. :DFILE_FOUND
  103.     MESSAGE "! %P5% (D###) already exists."
  104. EXIT 1
  105.  
  106. ; End of script file
  107.