home *** CD-ROM | disk | FTP | other *** search
/ Carsten's PPE Collection / Carstens_PPE_Collection_2007.zip / T / TVIEW33.ZIP / TV.PPE (.txt) < prev    next >
PCBoard Programming Language Executable  |  1994-06-19  |  8KB  |  488 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.3 (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.         PrintLn "@POFF@"
  173.         DispFile STRING029, 2 + 1 + 4
  174.         Newline
  175.         Print "@X0E(@X0C" + String(MinLeft()) + "@X0E min. left) "
  176.         Print "(1-" + STRING032 + ") "
  177.         If (Upper(STRING004) <> "N") Print "(D)ownload "
  178.         PrintLn "(S)earch (A)bout (Q)uit (G)oodbye "
  179.         InputStr "@X0FCommand", STRING022, 7, 100, Mask_Ascii(), 256
  180.         Tokenize STRING022
  181.         Gosub LABEL008
  182.     EndWhile
  183.     Return
  184.     :LABEL008
  185.     While (Len(STRING022) > 0) Do
  186.         GetToken STRING022
  187.         If (STRING022 == "Q") Goto LABEL029
  188.         If (STRING022 == "QUIT") Goto LABEL029
  189.         If (STRING022 == "QU") Goto LABEL029
  190.         If (STRING022 == "G") Goto LABEL028
  191.         If (STRING022 == "GOODBYE") Goto LABEL028
  192.         If (STRING022 == "BYE") Goto LABEL028
  193.         If (STRING022 == "D") Gosub LABEL009
  194.         If (STRING022 == "S") Gosub LABEL015
  195.         If (STRING022 == STRING011) Gosub LABEL024
  196.         If (STRING022 == "NS") STRING022 = " "
  197.         If (STRING022 == "A") Gosub LABEL004
  198.         If (STRING022 <> " ") Gosub LABEL027
  199.     EndWhile
  200.     Return
  201.     :LABEL009
  202.     STRING022 = ""
  203.     If (Upper(STRING004) == "N") Return
  204.     STRING022 = " "
  205.     If (STRING004 == "S") Goto LABEL013
  206.     Gosub LABEL010
  207.     InputStr "@X0FFile to Download ", STRING027, 7, 100, Mask_Ascii(), 256
  208.     If (STRING027 == "") Return
  209.     Gosub LABEL014
  210.     If (STRING027 == " ") Return
  211.     Download ""
  212.     Return
  213.     :LABEL010
  214.     FOpen 2, STRING003 + "\TVDIR", 0, 0
  215.     FGet 2, STRING028
  216.     PrintLn "@X06" + STRING028
  217.     FGet 2, STRING028
  218.     PrintLn "@X06" + STRING028
  219.     FGet 2, STRING028
  220.     PrintLn "@X06" + STRING028
  221.     :LABEL011
  222.     If (Ferr(2)) Goto LABEL012
  223.     FGet 2, STRING028
  224.     If (InStr(STRING028, "|") > 0) PrintLn "@X03" + Space(33) + Mid(STRING028, 34, 45)
  225.     If (Abort()) FClose 2
  226.     If (Abort()) Return
  227.     STRING033 = Mid(STRING028, 1, 12)
  228.     STRING034 = Mid(STRING028, 16, 7)
  229.     STRING035 = Mid(STRING028, 24, 8)
  230.     STRING036 = Mid(STRING028, 34, 45)
  231.     If (InStr(STRING028, "|") == 0) PrintLn "@X0E" + STRING033 + "  @X0A" + STRING034 + "  @X0C" + STRING035 + "  @X0B" + STRING036
  232.     Goto LABEL011
  233.     :LABEL012
  234.     FClose 2
  235.     Return
  236.     :LABEL013
  237.     Flag STRING005
  238.     Download STRING005
  239.     Return
  240.     :LABEL014
  241.     If (Exist(STRING005 + "\" + STRING027)) Flag STRING005 + "\" + STRING027
  242.     If (!Exist(STRING005 + "\" + STRING027)) PrintLn "@X0C" + STRING027 + " Not Found!"
  243.     If (!Exist(STRING005 + "\" + STRING027)) STRING027 = " "
  244.     Return
  245.     :LABEL015
  246.     STRING022 = ""
  247.     STRING023 = ""
  248.     Newline
  249.     If (BOOLEAN001) Then
  250.         InputStr "@X0BEnter the Text to Scan for, (Enter) to Exit ", STRING025, 7, 100, Mask_Ascii(), 256
  251.         If (Len(STRING025) < 1) Return
  252.         Newline
  253.         InputStr "@X0BMenu item to search? (1-" + STRING032 + "), (A)ll, (Enter) to Exit ", STRING022, 7, Len(STRING032), Mask_Ascii(), 256
  254.         Tokenize STRING022
  255.         GetToken STRING022
  256.         If (STRING022 == "A") Gosub LABEL016
  257.         If (STRING022 == "") Return
  258.         If (STRING022 < 0) Goto LABEL025
  259.         If (STRING022 > INTEGER001) Goto LABEL025
  260.         Gosub LABEL026
  261.         Gosub LABEL017
  262.         STRING022 = ""
  263.         STRING022 = ""
  264.         Return
  265.     Endif
  266.     PrintLn "@X0CSorry, the SEARCH feature available in registered copies only."
  267.     Return
  268.     :LABEL016
  269.     INTEGER009 = 1
  270.     STRING022 = INTEGER009
  271.     While (INTEGER009 < INTEGER001 + 1) Do
  272.         STRING022 = INTEGER009
  273.         Gosub LABEL026
  274.         Gosub LABEL017
  275.         Inc INTEGER009
  276.         STRING022 = INTEGER009
  277.         If (INTEGER009 == INTEGER001) Return
  278.     EndWhile
  279.     Return
  280.     :LABEL017
  281.     BOOLEAN002 = 0
  282.     FOpen 1, STRING023, 0, 0
  283.     Newline
  284.     PrintLn "@X0ESearching menu item #", INTEGER006, "....."
  285.     Newline
  286.     FGet 1, STRING026
  287.     :LABEL018
  288.     If (Ferr(1)) Goto LABEL019
  289.     If (Abort()) FClose 1
  290.     If (Abort()) Return
  291.     If (InStr(Upper(STRING026), Upper(STRING025)) > 0) Gosub LABEL020
  292.     FGet 1, STRING026
  293.     Goto LABEL018
  294.     :LABEL019
  295.     FClose 1
  296.     If (!BOOLEAN002) PrintLn "@X0CThe requested text was not found in Menu Item #", INTEGER006, "@X07"
  297.     STRING022 = ""
  298.     STRING023 = ""
  299.     Return
  300.     :LABEL020
  301.     DefColor
  302.     FClose 1
  303.     Newline
  304.     BOOLEAN002 = 1
  305.     Print "@X0BThe Requested text has been found in Menu Item #", INTEGER006, ":"
  306.     DefColor
  307.     Newline
  308.     FOpen 1, STRING023, 0, 0
  309.     FGet 1, STRING026
  310.     :LABEL021
  311.     If (Ferr(1)) Goto LABEL022
  312.     INTEGER007 = 0
  313.     INTEGER007 = InStr(Upper(STRING026), Upper(STRING025))
  314.     If (InStr(Upper(STRING026), Upper(STRING025)) > 0) Gosub LABEL023
  315.     If (InStr(Upper(STRING026), Upper(STRING025)) < 1) PrintLn StripAtx(STRING026)
  316.     FGet 1, STRING026
  317.     Goto LABEL021
  318.     :LABEL022
  319.     FClose 1
  320.     STRING023 = ""
  321.     STRING022 = ""
  322.     Return
  323.     :LABEL023
  324.     Print StripAtx(Left(STRING026, INTEGER007 - 1))
  325.     Print "@X70" + Upper(STRING025)
  326.     DefColor
  327.     INTEGER010 = INTEGER007 + Len(STRING025)
  328.     INTEGER011 = Len(STRING026) - STRING025
  329.     PrintLn StripAtx(Mid(STRING026, INTEGER010, INTEGER011))
  330.     Return
  331.     :LABEL024
  332.     If (STRING011 == "NONE") Return
  333.     STRING011 = PPEPath() + STRING011
  334.     Shell 1, INTEGER005, STRING011, ""
  335.     If (!OnLocal()) Log "Shelled to " + STRING011, 1
  336.     STRING022 = " "
  337.     Return
  338.     :LABEL025
  339.     If (STRING022 == " ") Goto LABEL007
  340.     If (Len(STRING022) < 1) Goto LABEL007
  341.     Newline
  342.     Log STRING022 + " is an invalid command", 0
  343.     Beep
  344.     PrintLn Chr(7) + "@X0C[" + STRING022 + "] is an invalid command @FIRST@"
  345.     STRING022 = ""
  346.     Goto LABEL007
  347.     :LABEL026
  348.     If (Len(STRING022) < 1) Return
  349.     If (STRING022 == " ") Return
  350.     If (STRING007 == "DEFAULT") STRING023 = STRING003 + "\TV" + STRING022
  351.     If (STRING007 == "DEFAULT") Return
  352.     If (!BOOLEAN001) STRING023 = STRING003 + "\TV" + STRING022
  353.     If (!BOOLEAN001) Return
  354.     FOpen 1, STRING007, 0, 0
  355.     INTEGER006 = 0
  356.     While (STRING022 <> INTEGER006) Do
  357.         Inc INTEGER006
  358.         FGet 1, STRING023
  359.     EndWhile
  360.     FClose 1
  361.     Return
  362.     :LABEL027
  363.     If (STRING022 < 1) Goto LABEL025
  364.     If (STRING022 > INTEGER001) Goto LABEL025
  365.     STRING024 = TokenStr()
  366.     Tokenize STRING024
  367.     Gosub LABEL026
  368.     If (Len(STRING022) < 1) Return
  369.     If (STRING022 == " ") Return
  370.     PrintLn "@PON@"
  371.     If (InStr(STRING024, "NS")) PrintLn "@POFF@"
  372.     DispFile STRING023, 2 + 1 + 4
  373.     Wait
  374.     Log "Read File: " + STRING023, 0
  375.     STRING023 = " "
  376.     Return
  377.     :LABEL028
  378.     If (U_Sec == INTEGER002) Gosub LABEL006
  379.     If (Exist(STRING031)) DispFile STRING031, 2 + 1 + 4
  380.     Goodbye
  381.     End
  382.     :LABEL029
  383.     If (U_Sec == INTEGER002) Gosub LABEL006
  384.     Newline
  385.     If (Exist(STRING003 + "\TVBYE")) DispFile STRING003 + "\TVBYE", 2 + 1 + 4
  386.     End
  387.  
  388. ;------------------------------------------------------------------------------
  389. ;
  390. ; Usage report (before postprocessing)
  391. ;
  392. ; ■ Statements used :
  393. ;
  394. ;    4       End
  395. ;    3       Wait
  396. ;    32      Goto 
  397. ;    52      Let 
  398. ;    6       Print 
  399. ;    24      PrintLn 
  400. ;    86      If 
  401. ;    5       DispFile 
  402. ;    6       FOpen 
  403. ;    9       FClose 
  404. ;    29      FGet 
  405. ;    1       GetUser
  406. ;    4       DefColor
  407. ;    2       AdjTime 
  408. ;    4       Log 
  409. ;    5       InputStr 
  410. ;    24      Gosub 
  411. ;    37      Return
  412. ;    1       Delay 
  413. ;    2       Inc 
  414. ;    19      Newline
  415. ;    3       Tokenize 
  416. ;    4       GetToken 
  417. ;    1       Shell 
  418. ;    3       Beep
  419. ;    1       Goodbye
  420. ;    2       Flag 
  421. ;    2       Download 
  422. ;
  423. ;
  424. ; ■ Functions used :
  425. ;
  426. ;    1       -
  427. ;    1       *
  428. ;    75      +
  429. ;    3       -
  430. ;    35      ==
  431. ;    5       <>
  432. ;    8       <
  433. ;    6       >
  434. ;    21      !
  435. ;    9       Len(
  436. ;    14      Upper()
  437. ;    10      Mid()
  438. ;    2       Left()
  439. ;    1       Space()
  440. ;    3       Ferr()
  441. ;    2       Chr()
  442. ;    3       Asc()
  443. ;    7       InStr()
  444. ;    4       Abort()
  445. ;    3       StripAtx()
  446. ;    5       String()
  447. ;    5       Mask_Ascii()
  448. ;    4       PPEPath()
  449. ;    1       OnLocal()
  450. ;    3       MinLeft()
  451. ;    9       Exist()
  452. ;    1       TokenStr()
  453. ;    2       EvtTimeAdj()
  454. ;
  455. ;------------------------------------------------------------------------------
  456. ;
  457. ; Analysis flags : ASf
  458. ;
  459. ; A - Adjust online time remaining ■ 5
  460. ;     Program modify the amount of online time remaining, this may
  461. ;     be a way to bypass time limits
  462. ;     ■ Search for : ADJTIME
  463. ;
  464. ; S - Shell to DOS ■ 5
  465. ;     This may be normal if the PPE need to execute an external command,
  466. ;     but may be actually anything... nasty (formating HD, rebooting,...)
  467. ;     or usefull (sorting, maintenance,...). Check!
  468. ;     ■ Search for : SHELL
  469. ;
  470. ; f - Flag files for download ■ 3
  471. ;     This may be normal if a PPE needs to send some files, but since
  472. ;     this statement allows flagging of any file on the hard disk, you
  473. ;     have to be carefull. Check!
  474. ;     ■ Search for : FLAG
  475. ;
  476. ;------------------------------------------------------------------------------
  477. ;
  478. ; Postprocessing report
  479. ;
  480. ;    0       For/Next
  481. ;    4       While/EndWhile
  482. ;    2       If/Then or If/Then/Else
  483. ;    0       Select Case
  484. ;
  485. ;------------------------------------------------------------------------------
  486. ;                 AEGiS Corp - Break the routines, code against the machines!
  487. ;------------------------------------------------------------------------------
  488.