home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PCBOARD / DWNLDCD.ZIP / DWNLDCD.PPE (.txt) < prev    next >
PCBoard Programming Language Executable  |  1994-01-02  |  6KB  |  249 lines

  1. ;------------------------------------------------------------------------------
  2. ;                                                   .ss.
  3. ;                                                   `²²'
  4. ;             .,sS$Ss,,s$  .,sS$$$Ss.  .,sS$Ss,,s$ .ss.  .sSs.
  5. ;           .d$$²^°²$$$$'.d$P²°^^²$P'.d$$²^°²$$$$'.$$$' .$$$²Sb,.
  6. ;           $$$'   .$$$' $$$²Sçsµ²' .$$$'   .$$$'.$$$' .$$$'  `$$b.
  7. ;           $$$b,,d$$$' ,$$$b,....,s$$$$b,,d$$$'.$$$;.,$$$'    ;$$$
  8. ;           `²S$$S²²S$$S²°²S$$$$S²°°²S$$$$$$',$$S²°²S$S'.sS$$$P²'
  9. ;                                    .sS²°$$$²²°"'       d²°'
  10. ;                                  .$$²  .$$'
  11. ;                                  $$$.,d$$'
  12. ;                                  `²S$$S²'
  13. ;------------------------------------------------------------------------------
  14. ; P.P.L.X. 2.OO                          (C)1996 - Lone Runner / AEGiS CoRP'96 
  15. ;------------------------------------------------------------------------------
  16. ; PPE 2.OO (plain) - Analysis ON - Postprocessing ON
  17. ;------------------------------------------------------------------------------
  18.  
  19.     Integer  INTEGER001
  20.     Integer  INTEGER002
  21.     Integer  INTEGER003
  22.     Integer  INTEGER004
  23.     Integer  INTEGER005
  24.     Integer  INTEGER006
  25.     Integer  INTEGER007
  26.     Integer  INTEGER008
  27.     Integer  INTEGER009
  28.     Integer  INTEGER010
  29.     String   STRING001
  30.     String   STRING002
  31.     String   STRING003
  32.     String   STRING004
  33.     String   STRING005
  34.     String   STRING006
  35.     String   STRING007
  36.     String   STRING008
  37.     String   STRING009
  38.     String   STRING010
  39.  
  40. ;------------------------------------------------------------------------------
  41.  
  42.     If (AnsiOn()) Goto LABEL001
  43.     Print "Enter the filename to Download (Enter)=none"
  44.     Goto LABEL002
  45.     :LABEL001
  46.     If (PcbNode() == 0) Then
  47.         STRING008 = GetEnv("PCBDRIVE") + GetEnv("PCBDIR") + "\FLIST."
  48.     Else
  49.         STRING008 = GetEnv("PCBDRIVE") + GetEnv("PCBDIR") + "\FLIST." + String(PcbNode())
  50.     Endif
  51.     STRING004 = 0
  52.     INTEGER008 = 0
  53.     INTEGER009 = 0
  54.     INTEGER010 = 0
  55.     STRING002 = 1
  56.     INTEGER002 = 1
  57.     FOpen 1, STRING008, 0, 0
  58.     FDefIn 1
  59.     FSeek 1, 0, 0
  60.     For INTEGER002 = 1 To 100000
  61.         FSeek 1, 66, 1
  62.         FDRead STRING003, 13
  63.         If (Ferr(1)) Break
  64.         FSeek 1, 50, 1
  65.     Next
  66.     INTEGER001 = INTEGER002
  67.     If (INTEGER002 <> 1) Wait
  68.     PrintLn " "
  69.     PrintLn "!|1K|*"
  70.     PrintLn "@CLS@@X0A ┌────────────────────────────────────────────────────────────────────────────┐"
  71.     PrintLn " │  @X09░▒▓█@X1B         Statistics for the last 10 files in your batch         @X09█▓▒░@X0A  │"
  72.     PrintLn " │                                                                            │"
  73.     PrintLn " │   @X0BNum      Filename         Size        Transfer Time     Free    No Time  @X0A│"
  74.     PrintLn " │  @X0D────    ────────────    ──────────    ───────────────    ────    ───────  @X0A│"
  75.     FSeek 1, 0, 0
  76.     If (INTEGER001 > 10) Then
  77.         For INTEGER002 = 1 To INTEGER001 - 10
  78.             FSeek 1, 129, 1
  79.         Next
  80.     Else
  81.         INTEGER001 = 10
  82.     Endif
  83.     STRING002 = INTEGER001 - 9
  84.     For INTEGER002 = 1 To INTEGER001
  85.         FSeek 1, 66, 1
  86.         FDRead STRING003, 13
  87.         If (Ferr(1)) Break
  88.         FDRead STRING001, 4
  89.         STRING001 = Trim(STRING001, " ")
  90.         INTEGER008 = Asc(Left(STRING001, 1))
  91.         If (Len(STRING001) > 1) INTEGER009 = 256 * Asc(Mid(STRING001, 2, 1))
  92.         If (Len(STRING001) == 3) INTEGER010 = 65536 * Asc(Right(STRING001, 1))
  93.         STRING005 = INTEGER008 + INTEGER009 + INTEGER010
  94.         INTEGER009 = 0
  95.         INTEGER010 = 0
  96.         FDRead STRING001, 3
  97.         STRING001 = Trim(STRING001, " ")
  98.         INTEGER008 = Asc(Left(STRING001, 1))
  99.         If (Len(STRING001) > 1) INTEGER009 = 256 * Asc(Mid(STRING001, 2, 1))
  100.         If (Len(STRING001) == 3) INTEGER010 = 65536 * Asc(Right(STRING001, 1))
  101.         STRING007 = INTEGER008 + INTEGER009 + INTEGER010
  102.         FSeek 1, 9, 1
  103.         FDRead STRING010, 1
  104.         FDRead STRING009, 1
  105.         FSeek 1, 32, 1
  106.         STRING006 = String(S2I(STRING007, 10) / 60)
  107.         STRING007 = String(S2I(STRING007, 10) - S2I(STRING006, 10) * 60)
  108.         Print " │@X0B" + Left("     ", 6 - Len(STRING002)) + String(STRING002) + Left("                 ", 16 - Len(STRING003)) + "@X0F"
  109.         Print STRING003 + Left("               ", 14 - Len(STRING005))
  110.         Print STRING005 + Left("         ", 8 - Len(STRING006))
  111.         Print STRING006 + " @X07min@X0F" + Left("    ", 3 - Len(String(STRING007))) + String(STRING007) + " @X07sec      "
  112.         If (Asc(STRING010) == 1) Then
  113.             Print "@X0CY"
  114.         Else
  115.             Print "@X0EN"
  116.         Endif
  117.         Print "        "
  118.         If (Asc(STRING009) == 1) Then
  119.             Print "@X0CY"
  120.         Else
  121.             Print "@X0C@X0EN"
  122.         Endif
  123.         AnsiPos 79, 5 + INTEGER002
  124.         PrintLn "@X0A│"
  125.         AnsiPos 1, 6 + INTEGER002
  126.         Inc STRING002
  127.     Next
  128.     For INTEGER002 = INTEGER002 To 10
  129.         PrintLn " @X0A│@X0B" + Left("     ", 6 - Len(STRING002)) + String(STRING002) + "                             @X0F0       0 @X07min  @X0F0 @X07sec                     @X0A│"
  130.         Inc STRING002
  131.     Next
  132.     PrintLn " │                                                                            │"
  133.     PrintLn " │  @X09░▒▓█@X1B                Statistics for the ENTIRE batch                 @X09█▓▒░@X0A  │"
  134.     PrintLn " │                                                                            │"
  135.     Print " │    @X07Files: @X0F@FFILES:3@  @X07Size (bytes): @X0F@FBYTES:12@  @X07Estimated time: @X0F"
  136.     STRING004 = Trim(ScrText(14, 19, 2, 0), " ")
  137.     INTEGER003 = S2I(Trim(ScrText(33, 19, 12, 0), " "), 10)
  138.     If (OnLocal()) Then
  139.         INTEGER006 = 0.09 * ReadLine(PCBDat(), 53)
  140.     Else
  141.         INTEGER006 = Carrier() / 10
  142.         If (ErrCorrect()) Then
  143.             INTEGER006 = INTEGER006 * 1.05
  144.         Else
  145.             INTEGER006 = 0.96 * INTEGER006
  146.         Endif
  147.     Endif
  148.     INTEGER007 = INTEGER006 * 60
  149.     INTEGER004 = INTEGER003 / INTEGER007
  150.     INTEGER005 = INTEGER003 / INTEGER006 - INTEGER004 * 60
  151.     Print String(INTEGER004) + " @X07min" + " @X0F" + String(INTEGER005) + " @X07sec@X0A"
  152.     AnsiPos 79, 19
  153.     PrintLn "│"
  154.     PrintLn " └────────────────────────────────────────────────────────────────────────────┘"
  155.     PrintLn "           @X07Enter @X0Ffilename @X07on line above, or (@X0CENTER@X07) alone to continue"
  156.     If (S2I(STRING004, 10) > 9) STRING004 = 9
  157.     AnsiPos 13, 6 + STRING004
  158.     STRING003 = ""
  159.     InputStr "_", STRING003, 7, 12, Mask_File(), 8
  160.     AnsiPos 1, 21
  161.     STRING003 = Trim(STRING003, " ")
  162.     If (Len(STRING003) == 0) STRING003 = Chr(13)
  163.     KbdStuff STRING003
  164.     :LABEL002
  165.     End
  166.  
  167. ;------------------------------------------------------------------------------
  168. ;
  169. ; Usage report (before postprocessing)
  170. ;
  171. ; ■ Statements used :
  172. ;
  173. ;    1       End
  174. ;    1       Wait
  175. ;    24      Goto 
  176. ;    46      Let 
  177. ;    12      Print 
  178. ;    15      PrintLn 
  179. ;    20      If 
  180. ;    1       FOpen 
  181. ;    1       InputStr 
  182. ;    2       Inc 
  183. ;    1       KbdStuff 
  184. ;    5       AnsiPos 
  185. ;    8       FSeek 
  186. ;    1       FDefIn 
  187. ;    6       FDRead 
  188. ;
  189. ;
  190. ; ■ Functions used :
  191. ;
  192. ;    10      *
  193. ;    4       /
  194. ;    33      +
  195. ;    11      -
  196. ;    6       ==
  197. ;    1       <>
  198. ;    4       <
  199. ;    4       <=
  200. ;    4       >
  201. ;    8       >=
  202. ;    11      !
  203. ;    8       &&
  204. ;    4       ||
  205. ;    11      Len(
  206. ;    2       Mid()
  207. ;    8       Left()
  208. ;    2       Right()
  209. ;    2       Ferr()
  210. ;    1       Chr()
  211. ;    8       Asc()
  212. ;    5       Trim()
  213. ;    9       String()
  214. ;    1       Mask_File()
  215. ;    1       PCBDat()
  216. ;    2       PcbNode()
  217. ;    1       ReadLine()
  218. ;    1       OnLocal()
  219. ;    4       GetEnv()
  220. ;    5       S2I()
  221. ;    1       Carrier()
  222. ;    1       AnsiOn()
  223. ;    2       ScrText()
  224. ;    1       ErrCorrect()
  225. ;
  226. ;------------------------------------------------------------------------------
  227. ;
  228. ; Analysis flags : d
  229. ;
  230. ; d - Access PCBOARD.DAT ■ 2
  231. ;     Program gets the full pathname to PCBOARD.DAT, this may be usefull
  232. ;     for many PPE so they can find various informations on the system
  233. ;     (system paths, max number of lines in messages, ...) but it may also
  234. ;     be a way to gather vital informations.
  235. ;     ■ Search for : PCBDAT()
  236. ;
  237. ;------------------------------------------------------------------------------
  238. ;
  239. ; Postprocessing report
  240. ;
  241. ;    4       For/Next
  242. ;    0       While/EndWhile
  243. ;    6       If/Then or If/Then/Else
  244. ;    0       Select Case
  245. ;
  246. ;------------------------------------------------------------------------------
  247. ;                 AEGiS Corp - Break the routines, code against the machines!
  248. ;------------------------------------------------------------------------------
  249.