home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / FileMover / Dopus4 / ArexxScripts / psn-dpck.lha / DOpusPakken / Rexx / LhA-Control.Rexx < prev   
Encoding:
OS/2 REXX Batch file  |  1995-07-15  |  17.2 KB  |  512 lines

  1. /*
  2.           Done by Allan 'Duff' Odgaard on Monday 27-Feb-95 22:38:57
  3.           For selective extraction of Lh-Archives in DirectoryOpus.
  4.  
  5. $VER: LhA-Control.Rexx V2.5 (27-Feb-95) Allan 'Duff' Odgaard
  6. */
  7.  
  8. Parse Arg '"' SourceArc '"' PortName .
  9. If PortName ~= '' Then Address(PortName)
  10.  
  11. Busy On
  12.  
  13. Trace Results
  14.  
  15. Options Results
  16. Options FailAt 21
  17. Query ScreenName
  18. PubScreen = Result
  19. Signal On Syntax
  20.  
  21. BuffersInPref = 10    /* Look in ConfigPart/System/Directories */
  22.  
  23. Shell = 'Con:000/028/640/437/LhA-Selector V2.5 Output/Screen ' || PubScreen
  24.  
  25. If Open('Env','Env:LhA-Control.Paths','R') = 0 Then Do
  26.     Address Command 'C:Which LhA >T:LhA.Path';Open('LhA','T:LhA.Path','R');LhA = ReadLn('LhA');Close('LhA')
  27.     If LhA = '' Then Do;Address Command 'C:RequestFile >T:LhA.Path File "LhA" Title "Where is LhA?" NoIcons PubScreen' PubScreen;Open('LhA','T:LhA.Path','R');LhA = ReadLn('LhA');Close('LhA');End
  28.     Address Command 'C:Which MultiView >T:MultiView.Path';Open('MultiView','T:MultiView.Path','R');MultiView = ReadLn('MultiView');Close('MultiView')
  29.     If MultiView = '' Then Do;Address Command 'C:RequestFile >T:MultiView.Path File "MultiView" Title "Where is MultiView?" NoIcons PubScreen' PubScreen;Open('MultiView','T:MultiView.Path','R');MultiView = ReadLn('MultiView');Close('MultiView');End
  30.     Address Command 'C:Which Rx >T:Rx.Path';Open('Rx','T:Rx.Path','R');Rx = ReadLn('Rx');Close('Rx')
  31.     If Rx = '' Then Do;Address Command 'C:RequestFile >T:Rx.Path File "Rx" Title "Where is Rx?" NoIcons PubScreen' PubScreen;Open('Rx','T:Rx.Path','R');Rx = ReadLn('Rx');Close('Rx');End
  32.     If show('p','SWAZINFO') = 1 Then Do
  33.         Address Command 'C:Which SwazFix >T:SwazFix.Path';Open('SwazFix','T:SwazFix.Path','R');SwazFix = ReadLn('SwazFix');Close('SwazFix')
  34.         If SwazFix = '' Then Do;Address Command 'C:RequestFile >T:SwazFix.Path File "SwazFix" Title "Where is SwazFix?" NoIcons PubScreen' PubScreen;Open('SwazFix','T:SwazFix.Path','R');SwazFix = ReadLn('SwazFix');Close('SwazFix');End
  35.     End
  36.     Open('Env','Env:LhA-Control.Paths','W')
  37.     WriteLn('Env',LhA)
  38.     WriteLn('Env',MultiView)
  39.     WriteLn('Env',Rx)
  40.     WriteLn('Env',SwazFix)
  41.     Close('Env')
  42.     Address Command 'C:Copy Env:LhA-Control.Paths EnvArc: Quiet'
  43.     End
  44. Else Do
  45.     LhA = ReadLn('Env')
  46.     MultiView = ReadLn('Env')
  47.     Rx = ReadLn('Env')
  48.     SwazFix = ReadLn('Env')
  49.     Close('Env')
  50.     End
  51. EndIf
  52.  
  53. TmpPath = 'T:LhA-Ctrl_By_Duff/'
  54. OldBuf = BuffersInPref - 1
  55.  
  56.  
  57. TmpList = TmpPath'TmpLhAList.Duff'
  58. TmpFiles = TmpPath'TmpExtFiles.Duff'
  59. ScriptFile = TmpPath'TmpScript.Duff'
  60.  
  61. lf = '0a'x
  62.  
  63. Status 3
  64. ActiveWin = Result
  65.  
  66. Status 13 ActiveWin
  67. CurrentPath = Result
  68.  
  69. If Show('p','MouseActions') = 1 Then Call AllReady
  70.  
  71. Call AddLib("rexxsupport.library",0,-30,0)
  72. Call AddLib("rexxreqtools.library",0,-30,0)
  73.  
  74. If SourceArc ~= '' Then Signal GotIt
  75.  
  76. GetNextSelected
  77. SourceArc = Result
  78. If SourceArc = 0 Then Signal Fuser
  79.  
  80. GotIt:
  81. If Open('TestForLhA',CurrentPath || SourceArc,'R') = 0 Then Signal NotALhAFile
  82. Seek('TestForLhA',2,'B')
  83. If ReadCh('TestForLhA',3) ~= '-lh' Then Signal NotALhAFile
  84. Close('TestForLhA')
  85.  
  86. Ds = 'No Description found in archive....'
  87. Delete('T:File_Id.Diz')
  88. Address Command LhA' x -a -qIM -Qw -Qo "' || CurrentPath || SourceArc || '" File_Id.Diz T:'
  89. If Exists('T:File_Id.Diz') = 1 Then
  90.  
  91.     Do
  92.     Open('Desc','T:File_Id.Diz','R')
  93.     Descr = ""
  94.  
  95.         Do While ~EOF('Desc')
  96.         Descr = Descr ReadLn('Desc')
  97.         End
  98.  
  99.     Close('Desc')
  100.     Ds = Right(Descr,Length(Descr)-1)
  101.     Address Command "C:Delete T:File_Id.Diz >NIL:"
  102.     End
  103.  
  104. Status 21 ActiveWin set 1
  105. ClearWin
  106. TopText Ds
  107. /* TopText 'Listing 'SourceArc' to buffer...' */
  108.  
  109. Busy On
  110. Address Command 'C:MakeDir "'Left(TmpPath,Length(TmpPath)-1)'"'
  111. Address Command 'C:Assign "Used By Duff:" "'Left(TmpPath,Length(TmpPath)-1)'"'
  112. Address Command LhA' vq -INMQw "'CurrentPath || SourceArc'" >"'TmpList'"'
  113. Address Command 'C:Sort "'TmpList'" "'TmpList'"'
  114. Open('Archive',TmpList,'R')
  115.  
  116. SetWinTitle '"'SourceArc':"' ActiveWin
  117. AddCustEntry '" -> Double click me when finished <- "' 0 '2' '3' '1' '0' '-1'
  118.  
  119. FindLoop:    Entry = ReadLn('Archive')
  120.         If EOF('Archive') Then Signal FoundAll
  121.         AddCustEntry '"'Entry'"' '?' '-1' '-1' '1' '0' '-1'
  122.         Signal FindLoop
  123. FoundAll:    Close('Archive')
  124.         Delete(TmpList)
  125.         DisplayDir
  126.  
  127.     AddCustHandler 'MouseActions' ActiveWin
  128.     OpenPort('MouseActions')
  129.     Busy Off
  130.  
  131. WaitPacket:
  132.     Call WaitPkt('MouseActions')
  133.     Packet = GetPKT('MouseActions')
  134.  
  135.     Click = GetArg(packet,0)
  136.     Number = GetArg(packet,1)
  137.     Name = GetArg(packet,2)
  138.     User = GetArg(packet,3)
  139.  
  140.     Reply(packet,0)
  141.  
  142.     Busy On
  143.  
  144.     If Click=1 Then
  145.         If Number=0 Then Signal End
  146.         Else Signal DoActionOnFile
  147.  
  148.     If Click=2 Then
  149.         If Number=0 Then Signal SecretPart
  150.         Else Signal AddEntry2File
  151.  
  152.     If Click=q Then Signal End
  153.  
  154.     Busy Off
  155.     Signal WaitForSignal
  156.  
  157. AddEntry2File:    Status 3 set ActiveWin
  158.         SelectEntry Number 1 1
  159.         SelectEntry 0 0 1
  160.  
  161.         Status 3 Set ActiveWin
  162.         GetSelectedAll
  163.         AllFiles = Result
  164.         NumberOfFiles = Words(AllFiles)
  165.  
  166.         Busy On
  167.         Call rtezrequest("There are " || NumberOffiles || " selected file(s)." || lf || lf || "Extract file(s) with full path?", "_Yes|_No|_Extract as...|_Cancel","LhA-Control V2.5","RTEz_Flags=EZReqF_CenterText RT_ReqPos=ReqPos_CenterScr RT_PubScrName="PubScreen)
  168.         Busy Off
  169.         If RTResult = 0 Then Signal WaitForSignal
  170.         Busy On
  171.         If RTResult = 3 Then Signal ExtractAs
  172.  
  173.         TopText 'Building list over file(s) to extract...'
  174.         Open('Selected',TmpFiles,'W')
  175.  
  176.         Do Subject = 1 to NumberOfFiles
  177.         SelectEntry Word(AllFiles,Subject) 0 1
  178.         GetEntry  Word(AllFiles,Subject)+1
  179.         WriteLn('Selected','"'WildCard(Result)'"')
  180.         End Subject
  181.  
  182. Extract:    Close('Selected')
  183.         TopText 'Extracting selected file(s)...'
  184.         Status 13 1-ActiveWin
  185.         Path = Result
  186.         If RTResult = 1 Then
  187.         Address Command LhA' x -a -qIM -Qw -Qo "'CurrentPath || SourceArc'" "@'TmpFiles'" "'Path'"'
  188.         Else
  189.         Address Command LhA' e -a -qIM -x2 -Qw -Qo "'CurrentPath || SourceArc'" "@'TmpFiles'" "'Path'"'
  190.         Delete(TmpFiles)
  191.         ReScan 1-ActiveWin
  192.         Busy Off
  193.         Signal WaitForSignal
  194.  
  195. ExtractAs:    TopText "Extracting and renaming file(s)..."
  196.         Busy On
  197.  
  198.         Subject=0
  199. GoLoop:        Busy On
  200.         SelectEntry Word(AllFiles,Subject+1) 0 1
  201.         GetEntry  Word(AllFiles,Subject+1)+1
  202.         Name = Result
  203.         TstName = Substr(Name,LastPos("/",Name)+1)
  204.  
  205.         Status 13 1-ActiveWin
  206.         Path = Result
  207.  
  208.         Call rtgetstring(Name,"(Use '/' in name for dir creation.)" || lf lf || "Enter New File Name:","LhA-Control V2.5","_Extract|_Skip","RTEz_Flags=EZReqF_CenterText RT_ReqPos=ReqPos_CenterScr RT_PubScrName="PubScreen)
  209.         Altered = Result
  210.         If RTResult = 0 Then Signal FuncCanceled
  211.         Busy On
  212.  
  213.         If Exists(Path || Altered) = 1 Then Address Command 'C:Delete "'Path || WildCard(Altered)'"'
  214.         Call MakeNeededDir Altered
  215.  
  216.         If Exists(Path || TstName) = 0 Then
  217.         Do
  218.         Address Command LhA' e -a -qIM -x2 -Qw "'CurrentPath || SourceArc'" "'WildCard(Name)'" "'Path'"'
  219.         Address Command 'C:Rename "'Path || WildCard(TstName)'" To "'Path || Altered'"'
  220.         End
  221.             Else
  222.         Do
  223.         Address Command LhA' e -a -qIM -x2 -Qw "'CurrentPath || SourceArc'" "'WildCard(Name)'" "'TmpPath'"'
  224.         If Altered = WildCard(Altered) Then
  225.         Do
  226.         Address Command 'C:Copy "'TmpPath || WildCard(TstName)'" To "'Path || Altered'"'
  227.         Address Command 'C:Delete "'TmpPath || WildCard(TstName)'"'
  228.         End
  229.             Else
  230.         Do
  231.         Address Command 'C:Rename "'TmpPath || WildCard(TstName)'" To "'TmpPath'^Findes ik^"'
  232.         Address Command 'C:Copy "'TmpPath'^Findes ik^" To "'Path'^Findes ik^"'
  233.         Address Command 'C:Rename "'Path'^Findes ik^" To "'Path || Altered'"'
  234.         Address Command 'C:Delete "'TmpPath'^Findes ik^"'
  235.         Address Command 'C:Delete "'TmpPath || WildCard(TstName)'"'
  236.         End
  237.         End
  238.  
  239.         ReScan 1-ActiveWin
  240. FuncCanceled:    Subject = Subject +1
  241.         if Subject ~= NumberOfFiles Then Signal GoLoop
  242.         Busy Off
  243.         Signal WaitForSignal
  244.  
  245. MakeNeededDir:    Parse Arg SinglePath
  246.         NewPos = 0
  247. CreatePath:    If Verify(Substr(SinglePath,NewPos+1),'/','Match') = 0 Then Signal Go
  248.         NewPos = Verify(Substr(SinglePath,NewPos+1),'/','Match') + NewPos
  249.         MakeDir(Path || Left(SinglePath,NewPos-1))
  250.         Signal CreatePath
  251. Go:        Return
  252.  
  253. DoActionOnFile:    SelectEntry Number 1 1
  254.         SelectEntry 0 0 1
  255.  
  256.         Status 3 Set ActiveWin
  257.         GetSelectedAll
  258.         AllFiles = Result
  259.         NumberOfFiles = Words(AllFiles)
  260.  
  261.         Busy On
  262.         If Right(Name,5) = '.info' Then Call rtezrequest("There are " || NumberOffiles || " selected file(s)." || lf || lf || "Perform wich kind of action on file(s)?", "_MultiView|_Delete|_Execute...|_IconInfo|_Cancel","LhA-Control V2.5","RTEz_Flags=EZReqF_CenterText RT_ReqPos=ReqPos_CenterScr RT_PubScrName="PubScreen)
  263.         Else Call rtezrequest("There are " || NumberOffiles || " selected file(s)." || lf || lf || "Perform wich kind of action on file(s)?", "_MultiView|_Delete|_Execute...|_Cancel","LhA-Control V2.5","RTEz_Flags=EZReqF_CenterText RT_ReqPos=ReqPos_CenterScr RT_PubScrName="PubScreen)
  264.         Busy Off
  265.         If RTResult = 1 Then Signal MultiView
  266.         If RTResult = 2 Then Signal DeleteFile
  267.         If RTResult = 3 Then Signal Execute
  268.         If RTResult = 4 Then Signal IconInfo
  269.         If RTResult = 0 Then Signal WaitForSignal
  270.  
  271. EndAction:    Signal WaitForSignal
  272.  
  273. MultiView:    TopText "Extracting and MultiView'ing file(s)..."
  274.         Busy On
  275.  
  276.         Subject=1
  277. AIDW:        SelectEntry Word(AllFiles,Subject) 0 1
  278.         GetEntry  Word(AllFiles,Subject)+1
  279.         Name = Result
  280.         TstName = Substr(Name,LastPos("/",Name)+1)
  281.  
  282.         Address Command LhA' e -a -qIM -x2 -Qw "'CurrentPath || SourceArc'" "'WildCard(Name)'" "'TmpPath'"'
  283.         Address Command MultiView' "'TmpPath || TstName'" Screen'
  284.         Address Command 'C:Delete "'TmpPath || WildCard(TstName)'"'
  285.  
  286.         Subject = Subject + 1
  287.         If Subject ~= NumberOfFiles+1 Then Signal AIDW
  288.  
  289.         DOpusToFront
  290.         Busy Off
  291.         Signal WaitForSignal
  292.  
  293. DeleteFile:    TopText "Deleting selected file(s) in archive..."
  294.         Busy On
  295.  
  296.         Open('Selected',TmpFiles,'W')
  297.         Do Subject = 1 to NumberOfFiles
  298.         SelectEntry Word(AllFiles,Subject)-(Subject-1) 0 1
  299.         GetEntry  Word(AllFiles,Subject)+1-(Subject-1)
  300.         WriteLn('Selected','"'WildCard(Result)'"')
  301.         RemoveEntry Word(AllFiles,Subject)-(Subject-1) 1
  302.         End Subject
  303.  
  304.         Close('Selected')
  305.         Address Command LhA' d -qIM -Qp -Qw "'CurrentPath || SourceArc'" "@'TmpFiles'"'
  306.         Delete(TmpFiles)
  307.  
  308.         ClearWin
  309.  
  310.     AddCustHandler 'MouseActions' ActiveWin
  311.     OpenPort('MouseActions')
  312.  
  313.         TopText 'Re-reading 'SourceArc' to buffer...'
  314.         Address Command LhA' vq -INM -Qw "'CurrentPath || SourceArc'" >"'TmpList'"'
  315.         Address Command 'C:Sort "'TmpList'" "'TmpList'"'
  316.         Open('Archive',TmpList,'R')
  317.         SetWinTitle '"'SourceArc':"' ActiveWin
  318.         AddCustEntry '" -> Double click me when finished <- "' 0 '2' '3' '1' '0' '-1'
  319.  
  320.  
  321. FindLoop2:    Entry = ReadLn('Archive')
  322.         If EOF('Archive') Then Signal FoundAll2
  323.         AddCustEntry '"'Entry'"' '?' '-1' '-1' '1' '0' '-1'
  324.         Signal FindLoop2
  325. FoundAll2:    Close('Archive')
  326.         Delete(TmpList)
  327.         DisplayDir
  328.  
  329.         Busy Off
  330.         Signal WaitForSignal
  331.  
  332. Execute:    TopText "Extracting and executing file(s)..."
  333.         Busy On
  334.  
  335.         Subject=1
  336. FuckLoop:    SelectEntry Word(AllFiles,Subject) 0 1
  337.         GetEntry  Word(AllFiles,Subject)+1
  338.         Name = Result
  339.         TstName = Substr(Name,LastPos("/",Name)+1)
  340.  
  341.         Call rtgetstring(TstName,"Enter Command and its Arguments:","LhA-Control V2.5","_Execute|_Skip","RT_ReqPos=ReqPos_CenterScr RT_PubScrName="PubScreen)
  342.         Altered = Result
  343.         If RTResult = 0 Then Signal NameChanged
  344.         Busy On
  345.         Address Command LhA' e -a -qIM -x2 -Qw "'CurrentPath || SourceArc'" "'WildCard(Name)'" "'TmpPath'"'
  346.  
  347.         If Pos(TstName,Altered) = 0 Then
  348.         WholeFile = Altered
  349.  
  350.         Else
  351.  
  352.         Do
  353.         First = Left(Altered,Pos(TstName,Altered)-1)
  354.         Middle = '"'TmpPath || TstName'"'
  355.         Last = Right(Altered,length(Altered)-(Pos(TstName,Altered)+length(TstName)-1))
  356.         WholeFile = First || Middle || Last
  357.         End
  358.  
  359.         Address Command 'C:List >"'TmpPath'Version1.Duff" "'TmpPath || TstName'" NoHead'
  360.  
  361. Message = Rx' " Address '
  362. Message = Message || "'MouseActions' x"
  363.  
  364.         Open('Script',ScriptFile,'W')
  365.         WriteLn('Script','FailAt 999999')
  366.         WriteLn('Script','Stack 4096')
  367.         WriteLn('Script',WholeFile)
  368.         WriteLn('Script','Echo ""')
  369.         WriteLn('Script','DOpusRT -w -1 "Press left mouse button to continue..."')
  370. /*         WriteLn('Script','Echo NoLine "   Press [RETURN] to continue..."') */
  371. /*         WriteLn('Script','Set >NIL: Return ?') */
  372.         WriteLn('Script',Message)
  373.         WriteLn('Script','EndCLI')
  374.         Close('Script')
  375.  
  376.         Address Command 'C:NewShell "'Shell'" From "'ScriptFile'"'
  377.  
  378.         Call WaitPkt('MouseActions')
  379.         Packet = GetPKT('MouseActions')
  380.         Reply(packet,0)
  381.         Delete(ScriptFile)
  382.  
  383.         Address Command 'C:List >"'TmpPath'Version2.Duff" "'TmpPath || TstName'" NoHead'
  384.  
  385.         Open('OldVer',TmpPath'Version1.Duff','R')
  386.         Open('NewVer',TmpPath'Version2.Duff','R')
  387.         If ReadLn('OldVer') ~= ReadLn('NewVer') Then
  388.         Do
  389.         Call rtezrequest("The file has been changed." || lf || "Would you like to update it?","_Sure!|_Forget it!","LhA-Control V2.5", "RTEz_Flags=EZReqF_CenterText RT_ReqPos=ReqPos_CenterScr RT_PubScrName="PubScreen)
  390.         If RTResult = 1 Then Call UpDateFile
  391.         End
  392.         Else Address Command 'C:Delete "'TmpPath || WildCard(TstName)'" NoReq >NIL:'
  393.  
  394.         Close('OldVer')
  395.         Close('NewVer')
  396.  
  397.         Address Command 'C:Delete "'TmpPath || 'Version[1-2].Duff" >NIL:'
  398.  
  399. NameChanged:    Subject = Subject + 1
  400.         If Subject ~= NumberOfFiles+1 Then Signal FuckLoop
  401.  
  402.         DOpusToFront
  403.         Busy Off
  404.         Signal WaitForSignal
  405.  
  406. UpDateFile:    SinglePath = Name
  407.         NewPos = 0 ; First = 0
  408. CreatePath2:    If Verify(Substr(SinglePath,NewPos+1),'/','Match') = 0 Then Signal Go2
  409.         NewPos = Verify(Substr(SinglePath,NewPos+1),'/','Match') + NewPos
  410.         If Left(SinglePath,NewPos-1) = TstName & First = 0 Then
  411.         Do
  412.         First = 1
  413.         Address Command 'C:Rename "'TmpPath || TstName'" "'TmpPath || TstName'.1"'
  414.         TstName = TstName || '.1'
  415.         End        
  416.         MakeDir(TmpPath || Left(SinglePath,NewPos-1))
  417.         Signal CreatePath2
  418. Go2:        Address Command 'C:Rename "' || TmpPath || TstName || '" "' || TmpPath || Name || '"'
  419. ExeUpdate:    Address Command LhA' u -rqIM -Qw "'CurrentPath || SourceArc'" "'TmpPath'" "'Name'"'
  420.         If RC > 0 Then Signal IOErr
  421. ExeDelete:    If Verify(Name,'/','Match') = 0 Then
  422.         Address Command 'C:Delete "'TmpPath || WildCard(Name)'" All NoReq >NIL:'
  423.         Else
  424.         Do
  425.         NewPos = Verify(Name,'/','Match')
  426.         Address Command 'C:Delete "'TmpPath || WildCard(Left(Name,NewPos))'" All NoReq >NIL:'
  427.         End
  428.         Return
  429.  
  430. IconInfo:    TopText "Extracting and view'ing icon..."
  431.         TstName = Substr(Name,LastPos("/",Name)+1)
  432.  
  433.         Address Command LhA' e -a -qIM -x2 -Qw "'CurrentPath || SourceArc'" "'WildCard(Name)'" "'TmpPath'"'
  434.         Address Command 'C:List >"'TmpPath'Version1.Duff" "'TmpPath || TstName'" NoHead'
  435.         If Show('p','SWAZINFO') = 0 Then IconInfo '"'TmpPath || TstName'"'
  436.         Else Address Command SwazFix' "'TmpPath || TstName'"'
  437.         EndIf
  438.         Address Command 'C:List >"'TmpPath'Version2.Duff" "'TmpPath || TstName'" NoHead'
  439.         Open('OldVer',TmpPath'Version1.Duff','R')
  440.         Open('NewVer',TmpPath'Version2.Duff','R')
  441.         If ReadLn('OldVer') ~= ReadLn('NewVer') Then
  442.         Do
  443.         Call rtezrequest("The file has been changed." || lf || "Would you like to update it?","_Sure!|_Forget it!","LhA-Control V2.5", "RTEz_Flags=EZReqF_CenterText RT_ReqPos=ReqPos_CenterScr RT_PubScrName="PubScreen)
  444.         If RTResult = 1 Then Call UpDateFile
  445.         End
  446.         Else Address Command 'C:Delete "'TmpPath || WildCard(TstName)'" NoReq >NIL:'
  447.         Close('OldVer')
  448.         Close('NewVer')
  449.         Address Command 'C:Delete "'TmpPath || 'Version[1-2].Duff" >NIL:'
  450.         SelectEntry Number 0 1
  451.  
  452.         Signal WaitForSignal
  453.  
  454. WaitForSignal:    TopText "Don't take anything for granted, register TODAY!"
  455.         Signal    WaitPacket
  456.  
  457. IOErr:        Call rtezrequest("Error while updating archive.","_Then try again|_Ohh, fuck that!","LhA-Control V2.5", "RT_ReqPos=ReqPos_CenterScr RT_PubScrName="PubScreen)
  458.         If RTResult = 1 Then Signal ExeUpdate
  459.         Signal ExeDelete
  460.  
  461. Wildcard:    Parse Arg NoWild
  462.         NewPos = 0
  463. SortWild:    If Verify(Substr(NoWild,NewPos+1),'~*#?(|)[%]','Match') = 0 Then Signal FindAtr
  464.         NewPos = Verify(Substr(NoWild,NewPos+1),'~*#?(|)[%]','Match') + NewPos
  465.         NoWild = Insert("'",NoWild,NewPos-1)
  466.         NewPos = NewPos + 1
  467.         Signal SortWild
  468. FindAtr:    If left(NoWild,1) = '@' Then NoWild = Insert('*',NoWild,0)
  469.         Return NoWild
  470.  
  471. End:        Status 21 ActiveWin set OldBuf
  472.         Address Command 'C:Assign "Used By Duff:" Remove'
  473.         Address Command 'C:Delete "'Left(TmpPath,Length(TmpPath)-1)'" All NoReq >NIL:'
  474.         Busy Off
  475.         Exit
  476.  
  477. Fuser:        Call rtezrequest("No file have been selected.","I see","LhA-Control V2.5", "RT_ReqPos=ReqPos_CenterScr RT_PubScrName="PubScreen)
  478.         Busy off
  479.         Exit
  480.  
  481. NotALhAFile:    Call rtezrequest("Sorry, but this doesn't seem to be a LhA file.","hmmrf","LhA-Control V2.5", "RT_ReqPos=ReqPos_CenterScr RT_PubScrName="PubScreen)
  482.         Busy off
  483.         Exit
  484.  
  485. AllReady:    Call rtezrequest("Sorry, but LhA-Control can't be runned twice!" || lf || "Should I quit the other LhA-Ctrl.","_Quit other|_No, commit suicide","LhA-Control V2.5", "RT_ReqPos=ReqPos_CenterScr RT_PubScrName="PubScreen)
  486.         If RTResult = 0 Then Do
  487.         Busy off
  488.         Exit
  489.         End
  490.         Else
  491.         Address 'MouseActions' q
  492. BeSure:        Address Command 'C:Wait 1'
  493.         If Show('p','MouseActions') = 0 Then Return
  494.         Signal BeSure
  495.         Return BackToBase
  496.  
  497. SecretPart:    Busy On
  498.         Call rtezrequest("LhA-Control V2.5 is © 27-Feb-95 by D&D Productions." lf lf "You're welcome to support my work by sending:" lf "Bug reports, own productions, suggestions or gift's!" lf "(Call DreamLine for latest update)" lf lf "Allan 'Duff' Odgaard" lf "Klostervænget 9, " lf "DK-2100 Copenhagen," lf "Denmark." lf lf "Greetz to Detron, Obiwan, Lowlifes etc.","I'll do that!","Be proud, coz' you found the secret about window!!!","RTEz_Flags=EZReqF_CenterText RT_ReqPos=ReqPos_CenterScr RT_PubScrName="PubScreen)
  499.         Busy Off
  500.         Status 3 set ActiveWin
  501.         SelectEntry 0 0 1
  502.         Signal WaitForSignal
  503.  
  504. Syntax:        Beep
  505.         Status 21 ActiveWin set OldBuf
  506.         Address Command 'C:Assign "Used By Duff:" Remove'
  507.         Address Command 'C:Delete "'Left(TmpPath,Length(TmpPath)-1)'" All NoReq'
  508.         Busy Off
  509.         TopText "Syntax Error" rc"," errortext(rc) "in line" sigl"."
  510.         Busy off
  511.         Exit
  512.