• Login
Community
  • Login

Searach a word and send results in a new file

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
9 Posts 3 Posters 4.0k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D
    Daniele Mangiapelo
    last edited by Oct 26, 2017, 9:42 AM

    Hi there,
    I am trying to find a way for exporting all the lines that contains a specific word or string in a new window so I can check it directly in the new window.

    For now I just doing find the word and then copy all the lines in a new window but would like to have something automatic for that,

    could you help?
    Thanks

    C 1 Reply Last reply Oct 26, 2017, 11:36 AM Reply Quote 0
    • C
      Claudia Frank @Daniele Mangiapelo
      last edited by Oct 26, 2017, 11:36 AM

      @Daniele-Mangiapelo

      By new window you mean a new notepad instance or just another tab?
      What means something automatic? The whole process or just parts of it?
      Did you try to record a macro already?

      Cheers
      Claudia

      1 Reply Last reply Reply Quote 0
      • D
        Daniele Mangiapelo
        last edited by Oct 26, 2017, 11:44 AM

        Hi,
        sorry for not being specific.
        I meant a new TAB.

        For something automatic I meant that after hit search for a specific word then I expect that the result is “imported” in a new tab automatically and not as now reported in the search window and then I have to copy and paste in the new TAB.

        Can you address me about the macro? I am not familiar with that concept.

        Thanks

        S C 2 Replies Last reply Oct 26, 2017, 11:49 AM Reply Quote 0
        • S
          Scott Sumner @Daniele Mangiapelo
          last edited by Oct 26, 2017, 11:49 AM

          @Daniele-Mangiapelo

          Probably the quickest and most painless way to doing what you are describing is through the use of the LineFilter2 plugin.

          If this (or ANY posting on the Notepad++ Community site) is useful, don’t reply with a “thanks”, simply up-vote ( click the ^ in the ^ 0 v area on the right ).

          1 Reply Last reply Reply Quote 1
          • C
            Claudia Frank @Daniele Mangiapelo
            last edited by Oct 26, 2017, 11:55 AM

            @Daniele-Mangiapelo

            Macros can be defined/recorded to automate repeating steps.
            Once a macro works as expected you can save it and assign a shortcut for later usage.

            Your steps should be

            • do your findings
            • once the find result window is open with the results press menu Macro->Start Recording
            • press F7 to switch to the find result window, results should be selected automatically.
            • press ctrl+c to copy the results
            • press F7 again to go back to edit area
            • press ctrl+n for a new tab
            • press ctrl+v to insert the results
            • press menu Macro->Stop recording

            if this is the expected result, go to menu Macro->Save Current Recorded Macro and give it
            a meaningful name. Now it should appear, with this name, under the Macro menu and you can assign a shortcut by using Modify Shortcut… from Macro menu.

            Cheers
            Claudia

            S 1 Reply Last reply Oct 26, 2017, 12:17 PM Reply Quote 0
            • S
              Scott Sumner @Claudia Frank
              last edited by Oct 26, 2017, 12:17 PM

              @Claudia-Frank

              Hello Claudia. I tried this and where you said “results should be selected automatically” I found this not to be the case for me. Am I doing something wrong?

              C 1 Reply Last reply Oct 26, 2017, 12:23 PM Reply Quote 0
              • C
                Claudia Frank @Scott Sumner
                last edited by Oct 26, 2017, 12:23 PM

                @Scott-Sumner

                Hi Scott,
                I don’t think so, did a quick test with the 7.5.1 installation and it was selected.
                So to be on the save side we should include a

                • ctrl+a

                before ctrl+c.

                Need to leave now … will check in detail later.

                Thanks and cheers
                Claudia

                1 Reply Last reply Reply Quote 0
                • D
                  Daniele Mangiapelo
                  last edited by Oct 26, 2017, 6:24 PM

                  Hi,
                  plugin linefilter2 seems to do iexactly what I need.
                  Thanks

                  C 1 Reply Last reply Oct 26, 2017, 6:34 PM Reply Quote 1
                  • C
                    Claudia Frank @Daniele Mangiapelo
                    last edited by Oct 26, 2017, 6:34 PM

                    @Daniele-Mangiapelo

                    good to see that you found a solution for you because I was just starting to write that
                    the macro solution seems not to work correctly with the find result window.

                    Cheers
                    Claudia

                    1 Reply Last reply Reply Quote 1
                    2 out of 9
                    • First post
                      2/9
                      Last post
                    The Community of users of the Notepad++ text editor.
                    Powered by NodeBB | Contributors