home *** CD-ROM | disk | FTP | other *** search
/ Carsten's PPE Collection / Carstens_PPE_Collection_2007.zip / T / TVIEW34.ZIP / TV.PPE (.txt) < prev    next >
PCBoard Programming Language Executable  |  1994-06-22  |  8KB  |  487 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.     Boolean  BOOLEAN001
  20.     Boolean  BOOLEAN002
  21.     Integer  INTEGER001
  22.     Integer  INTEGER002
  23.     Integer  INTEGER003
  24.     Integer  INTEGER004
  25.     Integer  INTEGER005
  26.     Integer  INTEGER006
  27.     Integer  INTEGER007
  28.     Integer  INTEGER008
  29.     Integer  INTEGER009
  30.     Integer  INTEGER010
  31.     Integer  INTEGER011
  32.     String   STRING001
  33.     String   STRING002
  34.     String   STRING003
  35.     String   STRING004
  36.     String   STRING005
  37.     String   STRING006
  38.     String   STRING007
  39.     String   STRING008
  40.     String   STRING009
  41.     String   STRING010
  42.     String   STRING011
  43.     String   STRING012
  44.     String   STRING013
  45.     String   STRING014
  46.     String   STRING015
  47.     String   STRING016
  48.     String   STRING017
  49.     String   STRING018
  50.     String   STRING019
  51.     String   STRING020
  52.     String   STRING021
  53.     String   STRING022
  54.     String   STRING023
  55.     String   STRING024
  56.     String   STRING025
  57.     String   STRING026
  58.     String   STRING027
  59.     String   STRING028
  60.     String   STRING029
  61.     String   STRING030
  62.     String   STRING031
  63.     String   STRING032
  64.     String   STRING033
  65.     String   STRING034
  66.     String   STRING035
  67.     String   STRING036
  68.  
  69. ;------------------------------------------------------------------------------
  70.  
  71.     STRING021 = "@X0BTextView v3.4 (c) Joseph Sheppard, The Ledge PCBoard (818) 896-4015"
  72.     Newline
  73.     GetToken STRING001
  74.     STRING001 = PPEPath() + STRING001
  75.     If (Exist(STRING001)) Then
  76.         Gosub LABEL001
  77.         If (STRING029 == "") STRING029 = STRING003 + "\TVMENU"
  78.         If (STRING030 == "") STRING030 = STRING003 + "\TVHELLO"
  79.         If (STRING031 == "") STRING031 = STRING003 + "\TVBYE"
  80.         Log "Executed TextView to Display " + STRING008, 0
  81.         If (Upper(Left(STRING009, 1)) == "Y") Gosub LABEL002
  82.         If (Exist(PPEPath() + "TV.KEY")) Gosub LABEL003
  83.         If (!BOOLEAN001) Gosub LABEL004
  84.         INTEGER004 = MinLeft()
  85.         If (Exist(STRING030)) DispFile STRING030, 2 + 1 + 4
  86.         If (Exist(STRING030)) Wait
  87.         GetUser
  88.         If (U_Sec == INTEGER002) Gosub LABEL005
  89.         Gosub LABEL007
  90.         Goto LABEL029
  91.         :LABEL001
  92.         FOpen 1, STRING001, 0, 0
  93.         FGet 1, STRING002
  94.         FGet 1, STRING003
  95.         FGet 1, INTEGER001
  96.         FGet 1, INTEGER002
  97.         FGet 1, INTEGER003
  98.         FGet 1, STRING004
  99.         FGet 1, STRING005
  100.         FGet 1, STRING006
  101.         FGet 1, STRING007
  102.         FGet 1, STRING008
  103.         FGet 1, STRING009
  104.         FGet 1, STRING010
  105.         FGet 1, STRING011
  106.         FGet 1, STRING029
  107.         FGet 1, STRING030
  108.         FGet 1, STRING031
  109.         FClose 1
  110.         STRING032 = INTEGER001
  111.         Return
  112.     Endif
  113.     Beep
  114.     Beep
  115.     Newline
  116.     PrintLn "@X0CThe Configuration File is Missing!  Please Notify the Sysop!"
  117.     PrintLn STRING001
  118.     Newline
  119.     End
  120.     :LABEL002
  121.     PrintLn Chr(7) + "@X0E" + Mid(STRING009, 3, Len(STRING009) - 2)
  122.     InputStr "@X0A[@X0FY@X0A]es, [@X0FN@X0A]o, [@X0FG@X0A]oodbye", STRING012, 7, 1, Mask_Ascii(), 0
  123.     If (Upper(STRING012) == "Y") Return
  124.     If (Upper(STRING012) == "G") Goto LABEL028
  125.     End
  126.     :LABEL003
  127.     FOpen 1, PPEPath() + "TV.KEY", 0, 0
  128.     FGet 1, STRING013
  129.     FGet 1, STRING014
  130.     FGet 1, STRING015
  131.     FGet 1, STRING016
  132.     FClose 1
  133.     STRING017 = Mid(STRING013, 4, 1)
  134.     STRING017 = String(Asc(STRING017) + 9)
  135.     STRING018 = Mid(STRING014, 2, 1)
  136.     STRING018 = String(Asc(STRING018) * 4)
  137.     STRING019 = Mid(STRING015, 3, 1)
  138.     STRING019 = String(Asc(STRING019) + 2)
  139.     STRING020 = STRING017 + STRING018 + STRING019
  140.     If (STRING020 == STRING016) BOOLEAN001 = 1
  141.     If (STRING020 <> STRING016) BOOLEAN001 = 0
  142.     Return
  143.     :LABEL004
  144.     STRING022 = ""
  145.     Newline
  146.     PrintLn STRING021
  147.     If (BOOLEAN001) Newline
  148.     If (BOOLEAN001) PrintLn "@X0ERegistered to:@X0F " + STRING013 + " on " + STRING015
  149.     If (BOOLEAN001) PrintLn "@X0E        Sysop: @X0F" + STRING014
  150.     If (!BOOLEAN001) PrintLn "@X0F[UNREGISTERED EVALUATION COPY]"
  151.     If (!BOOLEAN001) Newline
  152.     If (!BOOLEAN001) Delay 30
  153.     If (!BOOLEAN001) Wait
  154.     Newline
  155.     Return
  156.     :LABEL005
  157.     If (EvtTimeAdj()) Return
  158.     AdjTime INTEGER003
  159.     Newline
  160.     INTEGER008 = MinLeft()
  161.     PrintLn "@X0F" + String(INTEGER003) + " minutes have been added to your time while visiting " + STRING008
  162.     Newline
  163.     Return
  164.     :LABEL006
  165.     If (!EvtTimeAdj()) AdjTime -INTEGER003
  166.     Return
  167.     :LABEL007
  168.     While (STRING022 <> "Q") Do
  169.         GetToken STRING022
  170.         DefColor
  171.         Newline
  172.         DispFile STRING029, 2 + 1 + 4
  173.         Newline
  174.         Print "@X0E(@X0C" + String(MinLeft()) + "@X0E min. left) "
  175.         Print "(1-" + STRING032 + ") "
  176.         If (Upper(STRING004) <> "N") Print "(D)ownload "
  177.         PrintLn "(S)earch (A)bout (Q)uit (G)oodbye "
  178.         InputStr "@X0FCommand", STRING022, 7, 100, Mask_Ascii(), 256
  179.         Tokenize STRING022
  180.         Gosub LABEL008
  181.     EndWhile
  182.     Return
  183.     :LABEL008
  184.     While (Len(STRING022) > 0) Do
  185.         GetToken STRING022
  186.         If (STRING022 == "Q") Goto LABEL029
  187.         If (STRING022 == "QUIT") Goto LABEL029
  188.         If (STRING022 == "QU") Goto LABEL029
  189.         If (STRING022 == "G") Goto LABEL028
  190.         If (STRING022 == "GOODBYE") Goto LABEL028
  191.         If (STRING022 == "BYE") Goto LABEL028
  192.         If (STRING022 == "D") Gosub LABEL009
  193.         If (STRING022 == "S") Gosub LABEL015
  194.         If (STRING022 == STRING011) Gosub LABEL024
  195.         If (STRING022 == "NS") STRING022 = " "
  196.         If (STRING022 == "A") Gosub LABEL004
  197.         If (STRING022 <> " ") Gosub LABEL027
  198.     EndWhile
  199.     Return
  200.     :LABEL009
  201.     STRING022 = ""
  202.     If (Upper(STRING004) == "N") Return
  203.     STRING022 = " "
  204.     If (STRING004 == "S") Goto LABEL013
  205.     Gosub LABEL010
  206.     InputStr "@X0FFile to Download ", STRING027, 7, 100, Mask_Ascii(), 256
  207.     If (STRING027 == "") Return
  208.     Gosub LABEL014
  209.     If (STRING027 == " ") Return
  210.     Download ""
  211.     Return
  212.     :LABEL010
  213.     FOpen 2, STRING003 + "\TVDIR", 0, 0
  214.     FGet 2, STRING028
  215.     PrintLn "@X06" + STRING028
  216.     FGet 2, STRING028
  217.     PrintLn "@X06" + STRING028
  218.     FGet 2, STRING028
  219.     PrintLn "@X06" + STRING028
  220.     :LABEL011
  221.     If (Ferr(2)) Goto LABEL012
  222.     FGet 2, STRING028
  223.     If (InStr(STRING028, "|") > 0) PrintLn "@X03" + Space(33) + Mid(STRING028, 34, 45)
  224.     If (Abort()) FClose 2
  225.     If (Abort()) Return
  226.     STRING033 = Mid(STRING028, 1, 12)
  227.     STRING034 = Mid(STRING028, 16, 7)
  228.     STRING035 = Mid(STRING028, 24, 8)
  229.     STRING036 = Mid(STRING028, 34, 45)
  230.     If (InStr(STRING028, "|") == 0) PrintLn "@X0E" + STRING033 + "  @X0A" + STRING034 + "  @X0C" + STRING035 + "  @X0B" + STRING036
  231.     Goto LABEL011
  232.     :LABEL012
  233.     FClose 2
  234.     Return
  235.     :LABEL013
  236.     Flag STRING005
  237.     Download STRING005
  238.     Return
  239.     :LABEL014
  240.     If (Exist(STRING005 + "\" + STRING027)) Flag STRING005 + "\" + STRING027
  241.     If (!Exist(STRING005 + "\" + STRING027)) PrintLn "@X0C" + STRING027 + " Not Found!"
  242.     If (!Exist(STRING005 + "\" + STRING027)) STRING027 = " "
  243.     Return
  244.     :LABEL015
  245.     STRING022 = ""
  246.     STRING023 = ""
  247.     Newline
  248.     If (BOOLEAN001) Then
  249.         InputStr "@X0BEnter the Text to Scan for, (Enter) to Exit ", STRING025, 7, 100, Mask_Ascii(), 256
  250.         If (Len(STRING025) < 1) Return
  251.         Newline
  252.         InputStr "@X0BMenu item to search? (1-" + STRING032 + "), (A)ll, (Enter) to Exit ", STRING022, 7, Len(STRING032), Mask_Ascii(), 256
  253.         Tokenize STRING022
  254.         GetToken STRING022
  255.         If (STRING022 == "A") Gosub LABEL016
  256.         If (STRING022 == "") Return
  257.         If (STRING022 < 0) Goto LABEL025
  258.         If (STRING022 > INTEGER001) Goto LABEL025
  259.         Gosub LABEL026
  260.         Gosub LABEL017
  261.         STRING022 = ""
  262.         STRING022 = ""
  263.         Return
  264.     Endif
  265.     PrintLn "@X0CSorry, the SEARCH feature available in registered copies only."
  266.     Return
  267.     :LABEL016
  268.     INTEGER009 = 1
  269.     STRING022 = INTEGER009
  270.     While (INTEGER009 < INTEGER001 + 1) Do
  271.         STRING022 = INTEGER009
  272.         Gosub LABEL026
  273.         Gosub LABEL017
  274.         Inc INTEGER009
  275.         STRING022 = INTEGER009
  276.         If (INTEGER009 == INTEGER001) Return
  277.     EndWhile
  278.     Return
  279.     :LABEL017
  280.     BOOLEAN002 = 0
  281.     FOpen 1, STRING023, 0, 0
  282.     Newline
  283.     PrintLn "@X0ESearching menu item #", INTEGER006, "....."
  284.     Newline
  285.     FGet 1, STRING026
  286.     :LABEL018
  287.     If (Ferr(1)) Goto LABEL019
  288.     If (Abort()) FClose 1
  289.     If (Abort()) Return
  290.     If (InStr(Upper(STRING026), Upper(STRING025)) > 0) Gosub LABEL020
  291.     FGet 1, STRING026
  292.     Goto LABEL018
  293.     :LABEL019
  294.     FClose 1
  295.     If (!BOOLEAN002) PrintLn "@X0CThe requested text was not found in Menu Item #", INTEGER006, "@X07"
  296.     STRING022 = ""
  297.     STRING023 = ""
  298.     Return
  299.     :LABEL020
  300.     DefColor
  301.     FClose 1
  302.     Newline
  303.     BOOLEAN002 = 1
  304.     Print "@X0BThe Requested text has been found in Menu Item #", INTEGER006, ":"
  305.     DefColor
  306.     Newline
  307.     FOpen 1, STRING023, 0, 0
  308.     FGet 1, STRING026
  309.     :LABEL021
  310.     If (Ferr(1)) Goto LABEL022
  311.     INTEGER007 = 0
  312.     INTEGER007 = InStr(Upper(STRING026), Upper(STRING025))
  313.     If (InStr(Upper(STRING026), Upper(STRING025)) > 0) Gosub LABEL023
  314.     If (InStr(Upper(STRING026), Upper(STRING025)) < 1) PrintLn StripAtx(STRING026)
  315.     FGet 1, STRING026
  316.     Goto LABEL021
  317.     :LABEL022
  318.     FClose 1
  319.     STRING023 = ""
  320.     STRING022 = ""
  321.     Return
  322.     :LABEL023
  323.     Print StripAtx(Left(STRING026, INTEGER007 - 1))
  324.     Print "@X70" + Upper(STRING025)
  325.     DefColor
  326.     INTEGER010 = INTEGER007 + Len(STRING025)
  327.     INTEGER011 = Len(STRING026) - STRING025
  328.     PrintLn StripAtx(Mid(STRING026, INTEGER010, INTEGER011))
  329.     Return
  330.     :LABEL024
  331.     If (STRING011 == "NONE") Return
  332.     STRING011 = PPEPath() + STRING011
  333.     Shell 1, INTEGER005, STRING011, ""
  334.     If (!OnLocal()) Log "Shelled to " + STRING011, 1
  335.     STRING022 = " "
  336.     Return
  337.     :LABEL025
  338.     If (STRING022 == " ") Goto LABEL007
  339.     If (Len(STRING022) < 1) Goto LABEL007
  340.     Newline
  341.     Log STRING022 + " is an invalid command", 0
  342.     Beep
  343.     PrintLn Chr(7) + "@X0C[" + STRING022 + "] is an invalid command @FIRST@"
  344.     STRING022 = ""
  345.     Goto LABEL007
  346.     :LABEL026
  347.     If (Len(STRING022) < 1) Return
  348.     If (STRING022 == " ") Return
  349.     If (STRING007 == "DEFAULT") STRING023 = STRING003 + "\TV" + STRING022
  350.     If (STRING007 == "DEFAULT") Return
  351.     If (!BOOLEAN001) STRING023 = STRING003 + "\TV" + STRING022
  352.     If (!BOOLEAN001) Return
  353.     FOpen 1, STRING007, 0, 0
  354.     INTEGER006 = 0
  355.     While (STRING022 <> INTEGER006) Do
  356.         Inc INTEGER006
  357.         FGet 1, STRING023
  358.     EndWhile
  359.     FClose 1
  360.     Return
  361.     :LABEL027
  362.     If (STRING022 < 1) Goto LABEL025
  363.     If (STRING022 > INTEGER001) Goto LABEL025
  364.     STRING024 = TokenStr()
  365.     Tokenize STRING024
  366.     Gosub LABEL026
  367.     If (Len(STRING022) < 1) Return
  368.     If (STRING022 == " ") Return
  369.     PrintLn "@PON@"
  370.     If (InStr(STRING024, "NS")) PrintLn "@POFF@"
  371.     DispFile STRING023, 2 + 1 + 4
  372.     Wait
  373.     Log "Read File: " + STRING023, 0
  374.     STRING023 = " "
  375.     Return
  376.     :LABEL028
  377.     If (U_Sec == INTEGER002) Gosub LABEL006
  378.     If (Exist(STRING031)) DispFile STRING031, 2 + 1 + 4
  379.     Goodbye
  380.     End
  381.     :LABEL029
  382.     If (U_Sec == INTEGER002) Gosub LABEL006
  383.     Newline
  384.     If (Exist(STRING003 + "\TVBYE")) DispFile STRING003 + "\TVBYE", 2 + 1 + 4
  385.     End
  386.  
  387. ;------------------------------------------------------------------------------
  388. ;
  389. ; Usage report (before postprocessing)
  390. ;
  391. ; ■ Statements used :
  392. ;
  393. ;    4       End
  394. ;    3       Wait
  395. ;    32      Goto 
  396. ;    52      Let 
  397. ;    6       Print 
  398. ;    23      PrintLn 
  399. ;    86      If 
  400. ;    5       DispFile 
  401. ;    6       FOpen 
  402. ;    9       FClose 
  403. ;    29      FGet 
  404. ;    1       GetUser
  405. ;    4       DefColor
  406. ;    2       AdjTime 
  407. ;    4       Log 
  408. ;    5       InputStr 
  409. ;    24      Gosub 
  410. ;    37      Return
  411. ;    1       Delay 
  412. ;    2       Inc 
  413. ;    19      Newline
  414. ;    3       Tokenize 
  415. ;    4       GetToken 
  416. ;    1       Shell 
  417. ;    3       Beep
  418. ;    1       Goodbye
  419. ;    2       Flag 
  420. ;    2       Download 
  421. ;
  422. ;
  423. ; ■ Functions used :
  424. ;
  425. ;    1       -
  426. ;    1       *
  427. ;    75      +
  428. ;    3       -
  429. ;    35      ==
  430. ;    5       <>
  431. ;    8       <
  432. ;    6       >
  433. ;    21      !
  434. ;    9       Len(
  435. ;    14      Upper()
  436. ;    10      Mid()
  437. ;    2       Left()
  438. ;    1       Space()
  439. ;    3       Ferr()
  440. ;    2       Chr()
  441. ;    3       Asc()
  442. ;    7       InStr()
  443. ;    4       Abort()
  444. ;    3       StripAtx()
  445. ;    5       String()
  446. ;    5       Mask_Ascii()
  447. ;    4       PPEPath()
  448. ;    1       OnLocal()
  449. ;    3       MinLeft()
  450. ;    9       Exist()
  451. ;    1       TokenStr()
  452. ;    2       EvtTimeAdj()
  453. ;
  454. ;------------------------------------------------------------------------------
  455. ;
  456. ; Analysis flags : ASf
  457. ;
  458. ; A - Adjust online time remaining ■ 5
  459. ;     Program modify the amount of online time remaining, this may
  460. ;     be a way to bypass time limits
  461. ;     ■ Search for : ADJTIME
  462. ;
  463. ; S - Shell to DOS ■ 5
  464. ;     This may be normal if the PPE need to execute an external command,
  465. ;     but may be actually anything... nasty (formating HD, rebooting,...)
  466. ;     or usefull (sorting, maintenance,...). Check!
  467. ;     ■ Search for : SHELL
  468. ;
  469. ; f - Flag files for download ■ 3
  470. ;     This may be normal if a PPE needs to send some files, but since
  471. ;     this statement allows flagging of any file on the hard disk, you
  472. ;     have to be carefull. Check!
  473. ;     ■ Search for : FLAG
  474. ;
  475. ;------------------------------------------------------------------------------
  476. ;
  477. ; Postprocessing report
  478. ;
  479. ;    0       For/Next
  480. ;    4       While/EndWhile
  481. ;    2       If/Then or If/Then/Else
  482. ;    0       Select Case
  483. ;
  484. ;------------------------------------------------------------------------------
  485. ;                 AEGiS Corp - Break the routines, code against the machines!
  486. ;------------------------------------------------------------------------------
  487.