home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PCBOARD / SCUM_FPS.ZIP / DWNLD.PPE (.txt) < prev    next >
PCBoard Programming Language Executable  |  1994-01-31  |  7KB  |  328 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.     Date     DATE001
  20.     Integer  INTEGER001
  21.     Integer  INTEGER002
  22.     Integer  INTEGER003
  23.     Integer  INTEGER004
  24.     Integer  INTEGER005
  25.     Integer  INTEGER006
  26.     Integer  INTEGER007
  27.     Integer  INTEGER008
  28.     Integer  INTEGER009
  29.     Integer  INTEGER010
  30.     Integer  INTEGER011
  31.     Integer  INTEGER012
  32.     Integer  INTEGER013
  33.     Integer  INTEGER014
  34.     Integer  INTEGER015
  35.     Integer  INTEGER016
  36.     Integer  INTEGER017
  37.     Integer  INTEGER018
  38.     String   STRING001
  39.     String   STRING002
  40.     String   STRING003
  41.     String   STRING004
  42.     String   STRING005
  43.     String   STRING006
  44.     String   STRING007
  45.     String   STRING008
  46.     String   STRING009
  47.     String   STRING010
  48.     String   STRING011
  49.     String   STRING012
  50.  
  51. ;------------------------------------------------------------------------------
  52.  
  53.     If (Exist("DLINFO.FPS")) Delete "DLINFO.FPS"
  54.     If (AnsiOn()) Goto LABEL001
  55.     Print "Enter the filename to Download (Enter)=none"
  56.     Goto LABEL002
  57.     :LABEL001
  58.     STRING008 = GetEnv("PCBDRIVE") + GetEnv("PCBDIR") + "\FLIST." + String(PcbNode())
  59.     STRING004 = 0
  60.     INTEGER010 = 0
  61.     INTEGER011 = 0
  62.     INTEGER012 = 0
  63.     STRING002 = 1
  64.     INTEGER002 = 1
  65.     INTEGER016 = 0
  66.     INTEGER017 = ReadLine(PPEPath() + "PCBFPS.CFG", 2)
  67.     If (Exist(STRING008)) Then
  68.         FOpen 1, STRING008, 0, 0
  69.         FDefIn 1
  70.         FSeek 1, 0, 0
  71.         For INTEGER002 = 1 To 100000
  72.             FSeek 1, 66, 1
  73.             FDRead STRING003, 13
  74.             If (Ferr(1)) Break
  75.             FSeek 1, 50, 1
  76.         Next
  77.     Endif
  78.     INTEGER001 = INTEGER002
  79.     If (INTEGER002 <> 1) Then
  80.         Wait
  81.     Else
  82.         If (Exist("dlinfo.fps")) Delete "dlinfo.pps"
  83.     Endif
  84.     PrintLn " "
  85.     PrintLn "!|1K|*"
  86.     PrintLn "@CLS@@X0A ┌────────────────────────────────────────────────────────────────────────────┐"
  87.     PrintLn " │  @X09░▒▓█@X1B         Statistics for the last 10 files in your batch         @X09█▓▒░@X0A  │"
  88.     PrintLn " │                                                                            │"
  89.     PrintLn " │  @X0BNum     Filename       Size       Date     Transfer Time   Cost  No Time  @X0A│"
  90.     PrintLn " │  @X0D────  ────────────  ──────────  ────────  ───────────────  ────  ───────  @X0A│"
  91.     FOpen 6, "DLINFO.FPS", 1, 0
  92.     GetUser
  93.     FPutLn 6, U_Name()
  94.     FPutLn 6, INTEGER001 - 1
  95.     FSeek 1, 0, 0
  96.     If (INTEGER001 > 10) Then
  97.         For INTEGER002 = 1 To INTEGER001 - 10
  98.             FDRead STRING001, 66
  99.             If (Ferr(1)) Break
  100.             STRING001 = Trim(STRING001, " ")
  101.             DATE001 = FileInf(STRING001, 2)
  102.             FDRead STRING003, 13
  103.             FPutLn 6, STRING003
  104.             FDRead STRING001, 4
  105.             STRING001 = Trim(STRING001, " ")
  106.             INTEGER010 = Asc(Left(STRING001, 1))
  107.             If (Len(STRING001) > 1) INTEGER011 = 256 * Asc(Mid(STRING001, 2, 1))
  108.             If (Len(STRING001) == 3) INTEGER012 = 65536 * Asc(Right(STRING001, 1))
  109.             STRING005 = INTEGER010 + INTEGER011 + INTEGER012
  110.             INTEGER009 = STRING005 / INTEGER017
  111.             INTEGER011 = 0
  112.             INTEGER012 = 0
  113.             FDRead STRING001, 3
  114.             STRING001 = Trim(STRING001, " ")
  115.             INTEGER010 = Asc(Left(STRING001, 1))
  116.             If (Len(STRING001) > 1) INTEGER011 = 256 * Asc(Mid(STRING001, 2, 1))
  117.             If (Len(STRING001) == 3) INTEGER012 = 65536 * Asc(Right(STRING001, 1))
  118.             STRING007 = INTEGER010 + INTEGER011 + INTEGER012
  119.             FSeek 1, 9, 1
  120.             FDRead STRING010, 1
  121.             If (Asc(STRING010) == 1) INTEGER009 = 0
  122.             FPutLn 6, INTEGER009
  123.             FDRead STRING009, 1
  124.             FDRead STRING001, 1
  125.             FSeek 1, 31, 1
  126.         Next
  127.     Else
  128.         INTEGER001 = 10
  129.     Endif
  130.     STRING002 = INTEGER001 - 9
  131.     For INTEGER002 = 1 To INTEGER001
  132.         FDRead STRING001, 66
  133.         If (Ferr(1)) Break
  134.         STRING001 = Trim(STRING001, " ")
  135.         DATE001 = FileInf(STRING001, 2)
  136.         FDRead STRING003, 13
  137.         FPutLn 6, STRING003
  138.         FDRead STRING001, 4
  139.         STRING001 = Trim(STRING001, " ")
  140.         INTEGER010 = Asc(Left(STRING001, 1))
  141.         If (Len(STRING001) > 1) INTEGER011 = 256 * Asc(Mid(STRING001, 2, 1))
  142.         If (Len(STRING001) == 3) INTEGER012 = 65536 * Asc(Right(STRING001, 1))
  143.         STRING005 = INTEGER010 + INTEGER011 + INTEGER012
  144.         INTEGER011 = 0
  145.         INTEGER012 = 0
  146.         FDRead STRING001, 3
  147.         STRING001 = Trim(STRING001, " ")
  148.         INTEGER010 = Asc(Left(STRING001, 1))
  149.         If (Len(STRING001) > 1) INTEGER011 = 256 * Asc(Mid(STRING001, 2, 1))
  150.         If (Len(STRING001) == 3) INTEGER012 = 65536 * Asc(Right(STRING001, 1))
  151.         STRING007 = INTEGER010 + INTEGER011 + INTEGER012
  152.         FSeek 1, 9, 1
  153.         FDRead STRING010, 1
  154.         FDRead STRING009, 1
  155.         FDRead STRING001, 1
  156.         FSeek 1, 31, 1
  157.         STRING006 = String(S2I(STRING007, 10) / 60)
  158.         STRING007 = String(S2I(STRING007, 10) - S2I(STRING006, 10) * 60)
  159.         Print " │@X0B" + Left("     ", 5 - Len(STRING002)) + String(STRING002) + Left("                 ", 15 - Len(STRING003)) + "@X0F"
  160.         Print STRING003 + Left("               ", 12 - Len(STRING005))
  161.         INTEGER015 = STRING005
  162.         INTEGER013 = INTEGER015 / INTEGER017
  163.         STRING012 = INTEGER013
  164.         If (STRING012 == "0") Then
  165.             STRING012 = "FREE"
  166.             INTEGER016 = INTEGER016 + INTEGER015
  167.         Endif
  168.         Print STRING005 + "  "
  169.         Print String(DATE001) + Left("     ", 5 - Len(STRING006))
  170.         Print STRING006 + " @X07min@X0F" + Left("    ", 3 - Len(String(STRING007))) + String(STRING007) + " @X07sec" + Left("      ", 6 - Len(STRING012))
  171.         If (Asc(STRING010) == 1) Then
  172.             Print "@X0CFREE"
  173.             INTEGER016 = INTEGER016 + INTEGER015
  174.             FPutLn 6, "0"
  175.         Else
  176.             Print "@X0E" + STRING012
  177.             INTEGER014 = INTEGER014 + INTEGER013
  178.             FPutLn 6, STRING012
  179.         Endif
  180.         Print "      "
  181.         If (Asc(STRING009) == 1) Then
  182.             Print "@X0CY"
  183.         Else
  184.             Print "@X0C@X0EN"
  185.         Endif
  186.         AnsiPos 79, 5 + INTEGER002
  187.         PrintLn "@X0A│"
  188.         AnsiPos 1, 6 + INTEGER002
  189.         Inc STRING002
  190.     Next
  191.     For INTEGER002 = INTEGER002 To 10
  192.         PrintLn " @X0A│@X0B" + Left("    ", 5 - Len(STRING002)) + String(STRING002) + "                          @X0F0  00-00-00    0 @X07min  @X0F0 @X07sec                  @X0A│"
  193.         Inc STRING002
  194.     Next
  195.     PrintLn " │                                                                            │"
  196.     PrintLn " │  @X09░▒▓█@X1B                Statistics for the ENTIRE batch                 @X09█▓▒░@X0A  │"
  197.     PrintLn " │       @X07Files       @X07Size (Bytes)       File Points      @X07Estimated time     @X0F  │"
  198.     Print " │         @X0F@FFILES:3@           @X0F@FBYTES:12@         "
  199.     INTEGER018 = S2I(Trim(ScrText(26, 19, 12, 0), " "), 10)
  200.     INTEGER008 = (INTEGER018 - INTEGER016) / INTEGER017
  201.     STRING011 = INTEGER014
  202.     If (INTEGER008 > INTEGER014) STRING011 = INTEGER008
  203.     Print STRING011 + "           @X0F"
  204.     STRING004 = Trim(ScrText(12, 19, 2, 0), " ")
  205.     INTEGER003 = S2I(Trim(ScrText(26, 19, 12, 0), " "), 10)
  206.     If (OnLocal()) Then
  207.         INTEGER006 = 0.9 * (ReadLine(PCBDat(), 53) / 10)
  208.     Else
  209.         INTEGER006 = Carrier() / 10
  210.         If (ErrCorrect()) Then
  211.             INTEGER006 = INTEGER006 * 1.05
  212.         Else
  213.             INTEGER006 = 0.96 * INTEGER006
  214.         Endif
  215.     Endif
  216.     INTEGER007 = INTEGER006 * 60
  217.     INTEGER004 = INTEGER003 / INTEGER007
  218.     INTEGER005 = INTEGER003 % INTEGER006
  219.     INTEGER005 = INTEGER005 / 60
  220.     Print String(INTEGER004) + " @X07min" + " @X0F" + String(INTEGER005) + " @X07sec@X0A"
  221.     AnsiPos 79, 19
  222.     PrintLn "│"
  223.     PrintLn " └────────────────────────────────────────────────────────────────────────────┘"
  224.     PrintLn "       @X07Enter @X0Ffilename @X07on line above, or (@X0CENTER@X07) alone to continue"
  225.     If (S2I(STRING004, 10) > 9) STRING004 = 9
  226.     AnsiPos 11, 6 + STRING004
  227.     STRING003 = ""
  228.     InputStr "_", STRING003, 7, 12, Mask_File(), 8
  229.     AnsiPos 1, 21
  230.     STRING003 = Trim(STRING003, " ")
  231.     If (Len(STRING003) == 0) STRING003 = Chr(13)
  232.     FClose 6
  233.     KbdStuff STRING003
  234.     :LABEL002
  235.     End
  236.  
  237. ;------------------------------------------------------------------------------
  238. ;
  239. ; Usage report (before postprocessing)
  240. ;
  241. ; ■ Statements used :
  242. ;
  243. ;    1       End
  244. ;    1       Wait
  245. ;    27      Goto 
  246. ;    77      Let 
  247. ;    14      Print 
  248. ;    15      PrintLn 
  249. ;    30      If 
  250. ;    2       FOpen 
  251. ;    1       FClose 
  252. ;    7       FPutLn 
  253. ;    1       GetUser
  254. ;    2       Delete 
  255. ;    1       InputStr 
  256. ;    2       Inc 
  257. ;    1       KbdStuff 
  258. ;    5       AnsiPos 
  259. ;    8       FSeek 
  260. ;    1       FDefIn 
  261. ;    15      FDRead 
  262. ;
  263. ;
  264. ; ■ Functions used :
  265. ;
  266. ;    13      *
  267. ;    8       /
  268. ;    1       %
  269. ;    43      +
  270. ;    13      -
  271. ;    9       ==
  272. ;    1       <>
  273. ;    4       <
  274. ;    4       <=
  275. ;    7       >
  276. ;    8       >=
  277. ;    13      !
  278. ;    8       &&
  279. ;    4       ||
  280. ;    16      Len(
  281. ;    4       Mid()
  282. ;    11      Left()
  283. ;    4       Right()
  284. ;    3       Ferr()
  285. ;    1       Chr()
  286. ;    15      Asc()
  287. ;    10      Trim()
  288. ;    1       U_Name()
  289. ;    10      String()
  290. ;    1       Mask_File()
  291. ;    1       PCBDat()
  292. ;    1       PPEPath()
  293. ;    1       PcbNode()
  294. ;    2       ReadLine()
  295. ;    1       OnLocal()
  296. ;    2       GetEnv()
  297. ;    3       Exist()
  298. ;    6       S2I()
  299. ;    1       Carrier()
  300. ;    1       AnsiOn()
  301. ;    2       FileInf()
  302. ;    3       ScrText()
  303. ;    1       ErrCorrect()
  304. ;
  305. ;------------------------------------------------------------------------------
  306. ;
  307. ; Analysis flags : d
  308. ;
  309. ; d - Access PCBOARD.DAT ■ 2
  310. ;     Program gets the full pathname to PCBOARD.DAT, this may be usefull
  311. ;     for many PPE so they can find various informations on the system
  312. ;     (system paths, max number of lines in messages, ...) but it may also
  313. ;     be a way to gather vital informations.
  314. ;     ■ Search for : PCBDAT()
  315. ;
  316. ;------------------------------------------------------------------------------
  317. ;
  318. ; Postprocessing report
  319. ;
  320. ;    4       For/Next
  321. ;    0       While/EndWhile
  322. ;    8       If/Then or If/Then/Else
  323. ;    0       Select Case
  324. ;
  325. ;------------------------------------------------------------------------------
  326. ;                 AEGiS Corp - Break the routines, code against the machines!
  327. ;------------------------------------------------------------------------------
  328.