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