home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / FileMover / Dopus4 / LHA-CTRL.LHA / LhA-Control / Rexx / LhA-Ctrl.Rexx
Encoding:
OS/2 REXX Batch file  |  1994-11-11  |  15.9 KB  |  474 lines

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