home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PCBOARD / GIFCOL29.ZIP / GIFCOLL.PPE (.txt) < prev    next >
PCBoard Programming Language Executable  |  1994-03-28  |  10KB  |  467 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.     Integer  INTEGER011
  30.     Integer  INTEGER012
  31.     Integer  INTEGER013
  32.     Integer  INTEGER014
  33.     Integer  INTEGER015
  34.     Integer  INTEGER016
  35.     String   STRING001
  36.     String   STRING002
  37.     String   STRING003
  38.     String   STRING004
  39.     String   STRING005
  40.     String   TSTRING006(11)
  41.     String   STRING007
  42.     String   STRING008
  43.     String   STRING009
  44.     String   STRING010
  45.     String   STRING011
  46.     String   STRING012
  47.     String   STRING013
  48.     String   STRING014
  49.     String   STRING015
  50.     String   STRING016
  51.  
  52. ;------------------------------------------------------------------------------
  53.  
  54.     STRING001 = "14½ùÜ▀╕╢╣ÖÜì▀╜╜¼                                                 "
  55.     STRING002 = "Y"
  56.     STRING002 = YesChar()
  57.     INTEGER007 = 15
  58.     STRING008 = ReadLine(PCBDat(), 179)
  59.     STRING009 = ""
  60.     STRING009 = GetEnv("PCBNODE")
  61.     If (STRING009 == "") STRING009 = ReadLine(PCBDat(), 91)
  62.     STRING010 = STRING009
  63.     STRING011 = STRING010
  64.     If (STRING010 < 100) Then
  65.         STRING011 = "0" + STRING009
  66.         If (STRING010 < 10) Then
  67.             STRING011 = "00" + STRING009
  68.         Endif
  69.     Endif
  70.     STRING012 = ReadLine(PCBDat(), 94)
  71.     STRING015 = Random(9999)
  72.     If (STRING015 > 9980) Then
  73.         STRING015 = 9980
  74.     Endif
  75.     STRING016 = "FLIST"
  76.     If (Exist("FLIST." + STRING009)) Then
  77.         STRING016 = "FLIST." + STRING009
  78.     Endif
  79.     Log "GIF Collage processor command entered.", 0
  80.     If (TokCount() == 0) Then
  81.         PrintLn "@X0C Download path not specified on PPE command line."
  82.         Log "Download path not specified on GIFCOLL PPE command line.", 0
  83.         PrintLn "@X0F "
  84.         PrintLn "GIF Collage Processor Environment error - Inform your SysOp"
  85.         More
  86.         End
  87.     Endif
  88.     STRING014 = GetToken()
  89.     If (Exist("GIFCOLL." + STRING011)) Then
  90.         Delete "GIFCOLL." + STRING011
  91.     Endif
  92.     FOpen 1, "GIFCOLL." + STRING011, 1, 3
  93.     FPut 1, STRING012
  94.     FClose 1
  95.     Shell 1, INTEGER016, PPEPath() + "GIFCOL0.EXE " + STRING011 + STRING001, ""
  96.     INTEGER016 = 1
  97.     If (Exist("GIFCOLL." + STRING011)) Then
  98.         INTEGER016 = 0
  99.         Delete "GIFCOLL." + STRING011
  100.     Endif
  101.     If (Exist(PPEPath() + "GIFCOLL." + STRING010)) Then
  102.         Delete PPEPath() + "GIFCOLL." + STRING010
  103.     Endif
  104.     Cls
  105.     PrintLn " "
  106.     PrintLn "@X38┌────────────────────────────────────────────────────────────────────────────@X3B┐@X0B"
  107.     If (INTEGER016 == 0) Then
  108.         PrintLn "@X38│@X39                   GIF Collage Builder - Registered v2.9                    @X3B│@X0B"
  109.     Else
  110.         PrintLn "@X38│@X3E                    GIF Collage Builder - Shareware v2.9                    @X3B│@X0B"
  111.         PrintLn "@X38│@X3E                        Unregistered Evaluation Copy                        @X3B│@X0B"
  112.     Endif
  113.     PrintLn "@X38└@X3B────────────────────────────────────────────────────────────────────────────┘@X0F"
  114.     If (Exist("GIFCOLL." + STRING011)) Delete "GIFCOLL." + STRING011
  115.     If (Exist(STRING016)) Goto LABEL001
  116.     Log "PCBoard control file " + STRING016 + " not found, nothing flagged.", 0
  117.     Goto LABEL007
  118.     :LABEL001
  119.     STRING005 = "FLIST" + STRING011 + ".WRK"
  120.     If (Exist(STRING005)) Delete STRING005
  121.     FOpen 1, STRING016, 0, 0
  122.     FOpen 2, STRING005, 1, 1
  123.     :LABEL002
  124.     If (Ferr(1)) Goto LABEL003
  125.     FRead 1, STRING013, 129
  126.     FWrite 2, STRING013, 129
  127.     Goto LABEL002
  128.     :LABEL003
  129.     FClose 1
  130.     FClose 2
  131.     SaveScrn
  132.     Shell 1, INTEGER001, PPEPath() + "GIFCOL1.EXE " + STRING011 + STRING009, ""
  133.     RestScrn
  134.     INTEGER001 = 0
  135.     If (Exist("GIFCOLL." + STRING011)) Then
  136.         Goto LABEL004
  137.     Endif
  138.     Log "Unable to read PCBoard control file " + STRING016, 0
  139.     Log "Probable installation error.", 0
  140.     Log "Be sure that you have SHARE loaded.", 0
  141.     Goto LABEL007
  142.     :LABEL004
  143.     FOpen 1, "GIFCOLL." + STRING011, 0, 0
  144.     FGet 1, STRING013
  145.     :LABEL005
  146.     If (Ferr(1)) Goto LABEL006
  147.     INTEGER001 = INTEGER001 + 1
  148.     FGet 1, STRING013
  149.     Goto LABEL005
  150.     :LABEL006
  151.     FClose 1
  152.     If (INTEGER001 > 1) Then
  153.         INTEGER001 = INTEGER001 / 2
  154.     Endif
  155.     If (INTEGER001 > 0) Then
  156.         Goto LABEL008
  157.     Endif
  158.     :LABEL007
  159.     PrintLn " "
  160.     PrintLn "@X0EYou have not flagged any @X0CGIF@X0E files for a collage.@X0F"
  161.     PrintLn " "
  162.     DispFile HelpPath() + "GIF", 1 + 4
  163.     End
  164.     :LABEL008
  165.     If (INTEGER001 > 99) Then
  166.         PrintLn "@X0AYou have ", INTEGER001, " GIF's flagged - 99 is the max for this command."
  167.         PrintLn "The first 99 of them can be placed in collage files."
  168.         InputStr "@X0EDo you wish to continue (@X0CY@X0E/@X0CN@X0E)", STRING002, 14, 1, "", 8192 + 16384
  169.         If (Upper(STRING002) == "N") Then
  170.             Cls
  171.             End
  172.         Endif
  173.         INTEGER001 = 99
  174.     Endif
  175.     INTEGER008 = INTEGER001
  176.     If (INTEGER016 == 0) Then
  177.         Goto LABEL009
  178.     Endif
  179.     PrintLn " "
  180.     Print "@X0EAsk your SysOp to register this program to get rid of this delay. "
  181.     Print "@X0C"
  182.     For INTEGER002 = 1 To INTEGER007
  183.         Print "/"
  184.         Delay 4
  185.         Backup 1
  186.         Print "-"
  187.         Delay 5
  188.         Backup 1
  189.         Print "\"
  190.         Delay 4
  191.         Backup 1
  192.         Print "|"
  193.         Backup 1
  194.         Delay 5
  195.     Next
  196.     Backup 66
  197.     ClrEol
  198.     Goto LABEL010
  199.     :LABEL009
  200.     PrintLn " "
  201.     :LABEL010
  202.     PrintLn "@X0FYou have @X0A", INTEGER008, "@X0F GIF files flagged."
  203.     PrintLn " "
  204.     INTEGER013 = INTEGER008 / 9 + 1
  205.     INTEGER014 = INTEGER008 * 20 + INTEGER013 * 13
  206.     INTEGER011 = INTEGER014 / 60
  207.     If (INTEGER011 == 0) Then
  208.         INTEGER011 = 1
  209.     Endif
  210.     INTEGER012 = INTEGER011 + 1
  211.     If (INTEGER012 < 3) Then
  212.         PrintLn "@X0FIt will take 1-2 minutes to build your collage.  Please be patient."
  213.         PrintLn 
  214.     Else
  215.         If (MinLeft() < INTEGER012) Then
  216.             If (INTEGER013 < 10) Then
  217.                 PrintLn "@X0AYou do not have enough time left to build the collage file."
  218.                 Goto LABEL011
  219.             Endif
  220.             PrintLn "@X0AYou do not have enough time left to build the collage files."
  221.             :LABEL011
  222.             PrintLn "@X0F"
  223.             End
  224.         Endif
  225.         If (INTEGER001 < 10) Then
  226.             PrintLn "@X0FIt may take @X0E", INTEGER011, "-", INTEGER012, " minutes@X0F to build the collage file."
  227.         Else
  228.             PrintLn "@X0FIt may take @X0E", INTEGER011, "-", INTEGER012, " minutes@X0F to build the collage files."
  229.         Endif
  230.         InputStr "@X0EDo you wish to continue (@X0CY@X0E/@X0CN@X0E)", STRING002, 14, 1, "", 8192 + 16384
  231.         If (Upper(STRING002) == "N") Then
  232.             Cls
  233.             End
  234.         Endif
  235.         Newline
  236.         PrintLn " "
  237.         PrintLn "@X0AOK, here we go....."
  238.         PrintLn " "
  239.     Endif
  240.     If (Exist("GIFDEDK.CMD")) Goto LABEL012
  241.     Copy PPEPath() + "GIFDESK.CMD", "GIFDESK.CMD"
  242.     :LABEL012
  243.     For INTEGER002 = 1 To 11
  244.         TSTRING006(INTEGER002) = "*"
  245.     Next
  246.     INTEGER015 = 1
  247.     SaveScrn
  248.     Shell 1, INTEGER002, "ATTRIB -r " + STRING008 + "*.GIF", ""
  249.     Shell 1, INTEGER002, "DEL " + STRING008 + "*.GIF", ""
  250.     RestScrn
  251.     If (Exist("GIFDSK00.GIF")) Delete "GIFDSK00.GIF"
  252.     FOpen 1, "GIFCOLL." + STRING011, 0, 0
  253.     INTEGER010 = 0
  254.     INTEGER003 = GetX()
  255.     INTEGER004 = GetY()
  256.     :LABEL013
  257.     INTEGER009 = 9
  258.     If (INTEGER001 < 10) Then
  259.         INTEGER009 = INTEGER001
  260.     Endif
  261.     INTEGER001 = INTEGER001 - INTEGER009
  262.     INTEGER010 = INTEGER010 + 1
  263.     Print "@X0EPreparing @X0C", INTEGER009, "@X0E files for collage #", INTEGER010, ":@X0A"
  264.     INTEGER005 = GetX()
  265.     INTEGER006 = GetY()
  266.     For INTEGER002 = 1 To INTEGER009
  267.         FGet 1, STRING013
  268.         STRING003 = STRING013
  269.         FGet 1, STRING013
  270.         STRING004 = STRING008 + STRING013
  271.         AnsiPos INTEGER005, INTEGER006
  272.         ClrEol
  273.         Print " Frame ", INTEGER002, " is ", STRING013
  274.         Copy STRING003, STRING004
  275.     Next
  276.     AnsiPos INTEGER003, INTEGER004
  277.     ClrEol
  278.     :LABEL014
  279.     STRING015 = STRING015 + 1
  280.     STRING004 = STRING015
  281.     STRING003 = "C" + STRING010 + STRING004 + ".GIF"
  282.     INTEGER002 = 1
  283.     While (INTEGER002 < INTEGER015 + 1) Do
  284.         If (STRING003 == TSTRING006(INTEGER002)) Then
  285.             Goto LABEL014
  286.         Endif
  287.         INTEGER002 = INTEGER002 + 1
  288.     EndWhile
  289.     Print "@X0EBuilding GIF collage #", INTEGER010, " (", STRING003, ") - Please stand by....."
  290.     SaveScrn
  291.     Shell 1, INTEGER002, PPEPath() + "GIFDESK.EXE " + STRING008 + "*.gif", ""
  292.     RestScrn
  293.     If (Exist("GIFDSK00.GIF")) Goto LABEL015
  294.     PrintLn "@X0AGIFDESK collage build failed - Notify your SysOp."
  295.     Log "GIFDESK did not build the collage.", 0
  296.     PrintLn " "
  297.     PrintLn "@PAUSE@"
  298.     End
  299.     :LABEL015
  300.     AnsiPos INTEGER003, INTEGER004
  301.     ClrEol
  302.     PrintLn "@X0AGIF collage #", INTEGER010, " (", STRING003, ") is ready and being moved to a download area."
  303.     INTEGER003 = GetX()
  304.     INTEGER004 = GetY()
  305.     TSTRING006(INTEGER015) = STRING003
  306.     INTEGER015 = INTEGER015 + 1
  307.     STRING004 = STRING014 + "\" + STRING003
  308.     STRING003 = "GIFDSK00.GIF"
  309.     Copy STRING003, STRING004
  310.     Delete "GIFDSK00.GIF"
  311.     SaveScrn
  312.     Shell 1, INTEGER002, "ATTRIB -r " + STRING008 + "*.GIF", ""
  313.     Shell 1, INTEGER002, "DEL " + STRING008 + "*.GIF", ""
  314.     RestScrn
  315.     AnsiPos INTEGER003, INTEGER004
  316.     If (INTEGER001 > 0) Then
  317.         Goto LABEL013
  318.     Endif
  319.     FClose 1
  320.     Delete "GIFCOLL." + STRING011
  321.     PrintLn " "
  322.     PrintLn "@X0AYour collage file(s) are ready to download.  @X0CIf you do not want to download"
  323.     PrintLn "the GIF files that have been placed in the collage file(s), answer @X0FN@X0C to the"
  324.     PrintLn "@X0EDownload Flagged Files@X0C question.  @X0AIf you do want to download them along with"
  325.     PrintLn "the collage file(s), then answer @X0FY@X0A to the question."
  326.     STRING007 = TSTRING006(1)
  327.     INTEGER015 = 2
  328.     While (TSTRING006(INTEGER015) <> "*") Do
  329.         STRING007 = STRING007 + ";" + TSTRING006(INTEGER015)
  330.         INTEGER015 = INTEGER015 + 1
  331.         If (INTEGER015 > 11) Then
  332.             Break
  333.         Endif
  334.     EndWhile
  335.     Download STRING007
  336.     INTEGER015 = 1
  337.     While (TSTRING006(INTEGER015) <> "*") Do
  338.         Delete STRING014 + "\" + TSTRING006(INTEGER015)
  339.         INTEGER015 = INTEGER015 + 1
  340.         If (INTEGER015 > 11) Then
  341.             Break
  342.         Endif
  343.     EndWhile
  344.     If (INTEGER016 <> 0) Then
  345.         Cls
  346.         PrintLn " "
  347.         PrintLn " "
  348.         PrintLn " "
  349.         PrintLn " "
  350.         PrintLn " "
  351.         PrintLn "@X38┌────────────────────────────────────────────────────────────────────────────@X3B┐@X0B"
  352.         PrintLn "@X38│                          @X39GIF Collage Builder v2.9                          @X3B│@X0B"
  353.         PrintLn "@X38│@X3E                                                                            @X3B│@X0B"
  354.         PrintLn "@X38│@X3E Thank you for using the GIF Collage processor command.  If you find this   @X3B│@X0B"
  355.         PrintLn "@X38│@X3E PCBoard add on command usefull, please ask your SysOp to register it today!@X3B│@X0B"
  356.         PrintLn "@X38│@X3E You could even offer to share the small cost to get rid of that annoying   @X3B│@X0B"
  357.         PrintLn "@X38│@X3E delay when it starts along with this irritating screen.                    @X3B│@X0B"
  358.         PrintLn "@X38│@X3E                                                                            @X3B│@X0B"
  359.         PrintLn "@X38│@X39                     Remember, Shareware is NOT Freeware!                   @X3B│@X0B"
  360.         PrintLn "@X38│@X3E                                                                            @X3B│@X0B"
  361.         PrintLn "@X38└@X3B────────────────────────────────────────────────────────────────────────────┘@X0F"
  362.         PrintLn " "
  363.         PrintLn " "
  364.         PrintLn " "
  365.         PrintLn " "
  366.         PrintLn " "
  367.         PrintLn "@PAUSE@"
  368.     Endif
  369.     End
  370.  
  371. ;------------------------------------------------------------------------------
  372. ;
  373. ; Usage report (before postprocessing)
  374. ;
  375. ; ■ Statements used :
  376. ;
  377. ;    7       End
  378. ;    4       Cls
  379. ;    4       ClrEol
  380. ;    1       More
  381. ;    60      Goto 
  382. ;    67      Let 
  383. ;    9       Print 
  384. ;    59      PrintLn 
  385. ;    42      If 
  386. ;    1       DispFile 
  387. ;    5       FOpen 
  388. ;    5       FClose 
  389. ;    4       FGet 
  390. ;    1       FPut 
  391. ;    9       Delete 
  392. ;    7       Log 
  393. ;    2       InputStr 
  394. ;    4       Delay 
  395. ;    1       Newline
  396. ;    7       Shell 
  397. ;    4       AnsiPos 
  398. ;    5       Backup 
  399. ;    4       SaveScrn
  400. ;    4       RestScrn
  401. ;    1       FRead 
  402. ;    1       FWrite 
  403. ;    3       Copy 
  404. ;    1       Download 
  405. ;
  406. ;
  407. ; ■ Functions used :
  408. ;
  409. ;    2       *
  410. ;    3       /
  411. ;    70      +
  412. ;    1       -
  413. ;    8       ==
  414. ;    3       <>
  415. ;    11      <
  416. ;    3       <=
  417. ;    7       >
  418. ;    6       >=
  419. ;    35      !
  420. ;    6       &&
  421. ;    3       ||
  422. ;    2       Upper()
  423. ;    2       Ferr()
  424. ;    1       Random()
  425. ;    1       YesChar()
  426. ;    3       PCBDat()
  427. ;    6       PPEPath()
  428. ;    3       ReadLine()
  429. ;    1       GetToken()
  430. ;    1       MinLeft()
  431. ;    1       GetEnv()
  432. ;    11      Exist()
  433. ;    3       GetX()
  434. ;    3       GetY()
  435. ;    1       HelpPath()
  436. ;    1       TokCount()
  437. ;
  438. ;------------------------------------------------------------------------------
  439. ;
  440. ; Analysis flags : Sd
  441. ;
  442. ; S - Shell to DOS ■ 5
  443. ;     This may be normal if the PPE need to execute an external command,
  444. ;     but may be actually anything... nasty (formating HD, rebooting,...)
  445. ;     or usefull (sorting, maintenance,...). Check!
  446. ;     ■ Search for : SHELL
  447. ;
  448. ; d - Access PCBOARD.DAT ■ 2
  449. ;     Program gets the full pathname to PCBOARD.DAT, this may be usefull
  450. ;     for many PPE so they can find various informations on the system
  451. ;     (system paths, max number of lines in messages, ...) but it may also
  452. ;     be a way to gather vital informations.
  453. ;     ■ Search for : PCBDAT()
  454. ;
  455. ;------------------------------------------------------------------------------
  456. ;
  457. ; Postprocessing report
  458. ;
  459. ;    3       For/Next
  460. ;    3       While/EndWhile
  461. ;    27      If/Then or If/Then/Else
  462. ;    0       Select Case
  463. ;
  464. ;------------------------------------------------------------------------------
  465. ;                 AEGiS Corp - Break the routines, code against the machines!
  466. ;------------------------------------------------------------------------------
  467.