Removing or deleting bookmarked lines...

Removing or deleting bookmarked lines...

5
NewbieNewbie
5

    Jan 11, 2007#1

    This is my first query on this forum, so my apology if this question is a common one. I've used the forum search function with no luck.

    Is there a way to remove or delete bookmarked lines?

    Betty

    6,603548
    Grand MasterGrand Master
    6,603548

      Jan 11, 2007#2

      Following macro should to that. It works only for ASCII files, not for Unicode/UTF-8 files!

      InsertMode
      ColumnModeOff
      HexOff
      Loop
      Bottom
      PreviousBookmark
      IfEof
      ExitLoop
      EndIf
      ToggleBookmark
      DeleteLine
      EndLoop
      Top
      Best regards from an UC/UE/UES for Windows user from Austria

      5
      NewbieNewbie
      5

        Jan 12, 2007#3

        Wow....Mofi. Is there a page I can go to give you a donation for your help?

        I would gladly do that.

        I posted a question on how to create one blank spacing between paragraphs.

        Is there a way to set a command to put a period after the last word of each paragraph, if there is not a period already there?

        I know I'm picking brains here and I appreciate your help....as above though, I'd be happy to donate to your world for your gracious responses.

        Betty

        344
        MasterMaster
        344

          Jan 12, 2007#4

          Hi Betty,

          well, what is a paragraph in a word editor ? I suppose a new line (like when enter is pressed).
          You can do a (Perl) regular expression replace to transform text like this
          I got no dot
          I got a dot.
          I got no dot too
          No dot here
          into this:
          I got no dot.
          I got a dot.
          I got no dot too.
          No dot here.
          via a replace:
          ([^.])\r\n
          with
          $1.\r\n

          Not sure if I got you right. Pls post ALWAYS an example...

          @MOFI: I blicks net. \p soll laut Online-Hilfe \r\n sein. \p tut aber net :-(
          "Unzulaessiger RegExp". Idee ? UE 12.20b

          rds Bego
          Normally using all newest english version incl. each hotfix. Win 10 64 bit

          5
          NewbieNewbie
          5

            Jan 12, 2007#5

            Amending this after looking at your example Bego.

            Actually this is what I'm looking for. Macro(s) that will correct two things.

            1) Add the dot at the end of a paragraph if one does not already exist.

            2) Ensure that there is only one empty line (space or carriage return) between paragraphs.

            Before Macro(s) have run:

            I have no dot because this is one sentence which is part of a paragraph
            and now I will place a dot. Now on this sentence I will need a dot because it is the end of this second sentence, but I forgot to put a dot when I wrote this complete paragraph



            This second paragraph is three spaces apart to show an example of what my text file(s) look like presently. I also have paragraphs that are 2-4 lines or spaces between paragraphs, which I want corrected with a Macro. At the end of this paragraph I don't have dot either to show what my text files look like presently. I will be using these two paragraphs below to show the desired outcome after the Macro(s) are finished running


            After the Macros have run:

            I have no dot because this is one sentence which is part of a paragraph
            and now I will place a dot. Now on this sentence I will need a dot because it is the end of this second sentence, but I forgot to put a dot when I wrote this complete paragraph.

            This second paragraph is three spaces apart to show an example of what my text file(s) look like presently. I also have paragraphs that are 2-4 lines or spaces between paragraphs, which I want corrected with a Macro. At the end of this paragraph I don't have dot either to show what my text files look like presently. I will be using these two paragraphs below to show the desired outcome after the Macro(s) are finished running.


            Cheers,
            :lol:
            Betty

            344
            MasterMaster
            344

              Jan 12, 2007#6

              OK, Best you do it with 2 separate macros:

              EINELeerzeile

              Code: Select all

              InsertMode
              ColumnModeOff
              HexOff
              UnixReOn
              Top
              TrimTrailingSpaces
              Loop 
              Find "^p^p^p"
              Replace All "^p^p"
              IfNotFound
              ExitLoop
              EndIf
              EndLoop
              
              PunktVorLeerzeil

              Code: Select all

              Top
              Loop 
              Find RegExp "([^.])\p\p"
              Replace "\1.\p\p"
              IfNotFound
              ExitLoop
              EndIf
              EndLoop
              
              DOIT

              Code: Select all

              PlayMacro 1 "EINELeerzeile"
              PlayMacro 1 "PunktVorLeerzeil"
              
              lalala
              lalalalalPunkt



              lalala
              lalalaPunkt.


              lalala
              lalalaPunkt

              lalala
              lalalaPunkt

              After running DOIT:
              lalala
              lalalalalPunkt.

              lalala
              lalalaPunkt.

              lalala
              lalalaPunkt.

              lalala
              lalalaPunkt.

              HiH. Bego

              P.S. Notice the 2 empty lines at the end of your file.
              Macro property "Continue if nothing found" has to be on.
              Normally using all newest english version incl. each hotfix. Win 10 64 bit