Problem with MatchBrace

Problem with MatchBrace

1
NewbieNewbie
1

    Nov 29, 2004#1

    I've got the following in my script to delete several sections of a text file that are braced:

    Top
    Loop
    MatchBrace
    Key DEL
    IfEof
    ExitLoop
    EndIf
    EndLoop

    My problem is that after is successfully deletes the first brace section, it doesn't go to the next section...it just starts 'slowly' deleting text one character at a time.

    If I try to manually do a Brace command (using CTRL+B) is doesn't always work unless I page down a few screens and the brace section is visually displayed on the screen (of course this doesn't help the macro problem)

    Any ideas?
    Dan

    6,605548
    Grand MasterGrand Master
    6,605548

      Nov 30, 2004#2

      The problem is, that matching brace will not work as excepted, when a closing brace is found without an opening brace. For example a command like // 1.) will stop matching brace at ).
      Also your macro is not working correct, if after deleting the last matching brace selection the end of file is not reached (for example comment at end of file). This modified macro will do the job maybe better.

      Top
      Loop
      MatchBrace
      IfSel
      Delete
      Else
      Key RIGHT ARROW
      EndIf
      IfEof
      ExitLoop
      EndIf
      EndLoop
      Best regards from an UC/UE/UES for Windows user from Austria