home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / n / newsflash / !BBS / BBS / Scripts / QueueEdit < prev    next >
Encoding:
Text File  |  1996-09-16  |  3.2 KB  |  185 lines

  1. {
  2. | File queue editor
  3. | Alex Howarth (09 July 1996)
  4.  
  5. | Havent tested this much,. written for demo
  6.  
  7. LABEL rescanqlist
  8. REPORT "Queue editor"
  9. STD NL
  10. IF TAGGEDFILES<1 THEN
  11.   TAB 0 PRINT "No files queued" NL
  12.   GOSUB anykey
  13.   END
  14. ENDIF
  15. STD CLS
  16. BFG 7
  17. TAB 0  PRINT "Ref#"
  18. TAB 7  PRINT "FileName"
  19. TAB 20 PRINT "Bytes"
  20. NL
  21. OPENFILEBASE
  22. num%=1
  23. STARTMORE
  24. REPEAT
  25.   READTAG num%,mun%
  26.   READFILE mun%
  27.   BFG 3
  28.   TAB 0  PRINT num%
  29.   TAB 7  PRINT FILEBASENAME
  30.   TAB 20 PRINT FILEBASESIZE
  31.   num%=num%+1
  32.   NL
  33. UNTIL num%>TAGGEDFILES
  34. NL
  35. BFg 2 PRINT "R" 
  36. BFG 7 PRINT "emove a file / "
  37. BFG 2 PRINT "C"
  38. BFG 7 PRINT "lear list / "
  39. BFG 2 PRINT "D"
  40. BFG 7 PRINT "ownload queue / "
  41. BFG 2 PRINT "Q"
  42. BFG 7 PRINT "uit / "
  43. CLL
  44. BFG 2 PRINT "A"
  45. BFG 7 PRINT "uto download+logoff"
  46. CLL STD
  47. ENDMORE
  48. GETr option,"QRCDA"
  49. IF option="Q" THEN
  50.   CLOSEFILEBASE
  51.   END
  52. ENDIF
  53. IF option="R" THEN
  54.   REPORT "Removing queued file"
  55.   NL BFG 1
  56.   PRINT "File to remove (CR aborts) ref# "
  57.   BATTR 7,4 INPUTc value%,3
  58.   IF value%<>"" THEN
  59.     REMOVETAG value%
  60.     CLOSEFILEBASE
  61.     JUMP rescanqlist
  62.   ENDIF 
  63. ENDIF
  64. IF option="D" THEN
  65.   REPORT"Downloading tagged files"
  66.   STD NL NL BFG 3
  67.   PRINT"["+TAGGEDFILES+"file"
  68.   IF TAGGEDFILES>1 THEN
  69.     PRINT"(s)] for download.."
  70.   ELSE
  71.     PRINT"] for download.."
  72.   ENDIF
  73.   NL NL
  74.   GOSUB protocols
  75.   BFG 7 NL
  76.   IF xfer%<>99 THEN
  77.     BATCHSTART xfer%
  78.     tagnum%=1
  79.     REPEAT
  80.       READTAG tagnum%,filenum%
  81.       BATCHSEND filenum%,xfer%,stop%
  82.       tagnum%=tagnum%+1
  83.     UNTIL tagnum%>TAGGEDFILES OR stop%
  84.     BATCHFINISH xfer%
  85.     CLEARTAGS
  86.   ENDIF
  87.   CLOSEFILEBASE
  88. ENDIF
  89. IF option="A" THEN
  90.   STD
  91.   REPORT "Download tags and logoff"
  92.   NL
  93.   BFG 7 PRINT "There is no way back after this, are you sure "
  94.   PRINT "[" FG 7 PRINT "y"
  95.   BFG 7 PRINT "/" BFG 1 PRINT "N"
  96.   BFG 7 PRINT "]"
  97.   GETd option,"NY"
  98.   IF option="N" THEN
  99.     CLOSEFILEBASE
  100.     JUMP rescanqlist
  101.   ELSE
  102.     GOSUB protocols
  103.     IF xfer%<>99 THEN
  104.       BATCHSTART xfer%
  105.       tagnum%=1
  106.       REPEAT
  107.         READTAG tagnum%,filenum%
  108.         BATCHSEND filenum%,xfer%,stop%
  109.         tagnum%=tagnum%+1
  110.       UNTIL tagnum%>TAGGEDFILES OR stop%
  111.       BATCHFINISH xfer%          
  112.       CLEARTAGS
  113.     ENDIF
  114.     CLOSEFILEBASE
  115.     LOGOFF
  116.   ENDIF
  117. ENDIF
  118. IF option="C" THEN
  119.   REPORT "Clearing tags"
  120.   NL
  121.   BFG 7 PRINT "About to clear list, are you sure ["
  122.   FG 7 PRINT "y" BFG 7 PRINT "/"
  123.   BFG 1 PRINT "N" BFG 7 PRINT "]"
  124.   GETd option,"NY"
  125.   IF option="Y" THEN
  126.     CLEARTAGS
  127.   ELSE
  128.     JUMP rescanqlist
  129.   ENDIF
  130. ENDIF
  131.  
  132. END
  133.  
  134. SUB protocols
  135. | A sub within a script
  136. TAB 0 STD CLL
  137. BFG 2 PRINT"Z"
  138. BFG 7 PRINT"modem / "
  139. BFG 2 PRINT"Y"
  140. BFG 7 PRINT"modem / "
  141. BFG 2 PRINT"B"
  142. BFG 7 PRINT"YmodemB / "
  143. BFG 2 PRINT"X"
  144. BFG 7 PRINT"modem / "
  145. BFG 2 PRINT"1"
  146. BFG 7 PRINT"Xmodem1K / "
  147. BFG 2 PRINT"C"
  148. BFG 7 PRINT"XmodemCRC / "
  149. BFG 2 PRINT"Q"
  150. BFG 7 PRINT"ueue / "
  151. BFG 2 PRINT"A"
  152. BFG 7 PRINT"bort"
  153. GET protocol,"ZYBX1CQA"
  154. IF protocol="Z" THEN
  155.   protocol="Zmodem"
  156.   xfer%=5
  157. ENDIF
  158. IF protocol="Y" THEN
  159.   protocol="Ymodem"
  160.   xfer%=3
  161. ENDIF
  162. IF protocol="B" THEN
  163.   protocol="YmodemB"
  164.   xfer%=4
  165. ENDIF
  166. IF protocol="X" THEN
  167.   protocol="Xmodem"
  168.   xfer%=0
  169. ENDIF
  170. IF protocol="1" THEN
  171.   protocol="Xmodem1K"
  172.   xfer%=2
  173. ENDIF
  174. IF protocol="C" THEN
  175.   protocol="XmodemCRC"
  176.   xfer%=1
  177. ENDIF
  178. IF protocol="A" THEN
  179.   protocol="Abort"
  180.   xfer%=99 | not now used,. oh well:)
  181.   CLOSEFILEBASE
  182.   JUMP rescanqlist
  183. ENDIF
  184. ENDSUB
  185. }