home *** CD-ROM | disk | FTP | other *** search
/ Beijing Paradise BBS Backup / PARADISE.ISO / software / BBSDOORW / SCRIPTS.ZIP / PLXUPL.T < prev    next >
Encoding:
Text File  |  1995-01-26  |  2.4 KB  |  84 lines

  1.  :: Script to upload messages to Compuserve's EasyPlex Electronic mail.
  2.  ::  Called from phones2.t:       expand %lib/plxupl.t 001*
  3.  :: Assumes the "Prompt" option (not menu) Easyplex option has been set.
  4.  :: Message files have the addressee in the first line, Subject in 2nd.
  5.  :: Message files are stored in file names starting with 000 without extension
  6.  :: Error recovery has not been extensively tested.
  7.     on !c closetx;fail
  8.     open -!g %item
  9.     set s0 ""
  10.      while "L<4&&!%s0" grab s0
  11.     ss s0 ">INTERNET:|>[cC][Ss][iI]:|>[mM][cC][iI]|([0-9][0-9]*,[0-9][0-9]*)"
  12.     if !%z0 echoc "Bad Address: %s0"; goto foox
  13.     grab s1
  14.     if !t goto foox
  15.     put "\25g easy\r"
  16.     pat; pat 1  " COMpose, "; pat 2 "lex!"
  17.     pat 6 "Enter choice number !"
  18.     pat 7c "is unavailable"
  19.     pat 8c "Press <CR> to continue: " "\025\r"
  20.       pat 9 "Enter correction "
  21.     pat 10 "% EasyPlex is temporarily unav"
  22.     wait -F40
  23.     if 7 goto fini
  24.     if 10 goto foobar
  25.     if n goto foobar
  26.     put "\25com\r"
  27.     pat 1 "done";
  28.     wait -f20
  29.     if !1 goto foobar
  30.     pg10;
  31.     if dP ena -r
  32.     else ena -p
  33.     wait -f1        : let echoes stop already.
  34.     if "%s1>31" putv s1; putw "\r"; set s1 "Possible Duplicate Message"
  35.     t -gx!G            : file is uploaded here, low level FC
  36.     if du putw "\r    --- Uploaded %t\r"
  37.     put "\25/ex\r";
  38.     pat 1 "Send to"
  39.     wait -f20
  40.     if !1 goto foobar
  41.     put "\025%s0\r"
  42.     pat 1 "Subject:";
  43.     pat 2 " Invalid User ID:"
  44.     wait -f20
  45.     while "c&&2&&L<3" put "\025%s0\r" wait -f20
  46.     if !1 goto foobar
  47.     put "\025%s1\r"
  48.     echoc "File %item To: %s0 Sb: %s1"
  49.     pat 3 "Your name:"
  50.     pat 1 "correct";
  51.     pat 5c "YES or NO" "\25YES\r"
  52.     wait -f20
  53.     if 3 put "\25Chuck Forsberg\rY\r"; wait -f20
  54.     if !1 goto foobar
  55.     put "\25Y\r"
  56.     pat 1  " COMpose, ";
  57.     wait -f20
  58.     if "!1&&!2" goto foobar
  59.     :: Special case for the Godzilla of Talk Radio
  60.     if js0,limbaugh "!%mv %item rush"    : move to special subdirectory
  61.     if !dv "!%mv %item Z%item.tmp"
  62.     if dv "!%rename %item Z%item.tmp"
  63.     echoc "File Uploaded: %item moved to Z%item.tmp"
  64.     ena -tG!p
  65.     pat 1 OK; pat 2 TOP
  66.     put "\25top\r"
  67.     wait -f20; if !1 put "top\r"; wait -f20
  68.     return
  69. foobar:    put \3
  70.     pat 0c "exit CompuServe Mail anyway?" "y\r"
  71.     wait -f5
  72.     putw "\25t\r"
  73.     putw "\25top\r"
  74.     if "h% EasyPlex is temporarily unav" goto fini
  75.     ena -tG!p
  76.     return
  77. foox:    echoc "Moving %item to Y%item.tmp"
  78.     echoc "File Not Accpeted"
  79.     if !dv "!%mv %item Y%item.tmp"
  80.     if dv "!%rename %item Y%item.tmp"
  81. fini:    ena -gtG!p
  82.     nolog closetx
  83.     return
  84.