home *** CD-ROM | disk | FTP | other *** search
/ Chip 1995 March / CHIP3.mdf / demo / bitware / disk2 / bbsget.sc$ / bbsget.sc$
Encoding:
Text File  |  1995-06-28  |  1017 b   |  31 lines

  1. trace(1)
  2.  
  3. {BBSGET.ACT}
  4.  
  5. { This Action file initiates the receipt of data from a BBS. It checks }
  6. { if a filename argument is given, and prompts if not.                 }
  7.  
  8. @a = @1                         {argument 1 move to variable @A}
  9. if (@1 <> "") goto :noprompt    {if argument is null go to noprompt}
  10. @a = prompt("Enter receive filename: "); {ask for file name}
  11. if (@a = "") exit;                       {no file name, exit}
  12. @b = prompt("Enter X for Xmodem, A for Ascii: ");   {ask file xmodem or ASC}
  13. if (@b <> "x" and @b <> "a") exit "Don't understand ""@b""";  {check}
  14.  
  15. :noprompt                       {no prompt}
  16. {******************************************}
  17. {ask the host to download}
  18. "d;@a"; @return;
  19. cwait("?"); @b; @return;
  20.  
  21. {ASCII file transfer}
  22. if (@b = "x") goto :xmodem
  23.    cwait("?");
  24.    @return;
  25.    recvfile(@a, "ascii", "$07$0D");
  26.    exit;
  27.  
  28. :xmodem
  29.    cwait("...");
  30.    recvfile(@a, "xmodem");
  31.