Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Can we use "Copy Bookmarked Line" and "Paste in ReplaceWith" field in Macro

    Help wanted · · · – – – · · ·
    macros macro find & replace find and replac find replace
    4
    5
    78
    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.
    • B Sethi24
      B Sethi24 last edited by

      Can we use “Copy Bookmarked Line” and “Paste in ReplaceWith” field in Macro

      Could anyone please advice whether in Macro, “Copy Bookmarked Line” can be used and then its value can be used by Pasting in ReplaceWith" field.

      As in recorded macro, its showing the value used at the time of recording and not having the “Copy Bookmarked Line” command and Paste in ReplaceWith filed also.

      Thanks!

      Alan Kilborn 1 Reply Last reply Reply Quote 0
      • Alan Kilborn
        Alan Kilborn @B Sethi24 last edited by

        @B-Sethi24 said in Can we use "Copy Bookmarked Line" and "Paste in ReplaceWith" field in Macro:

        Can we use “Copy Bookmarked Line” and “Paste in ReplaceWith” field in Macro

        Nope.

        in recorded macro, its showing the value used at the time of recording

        Correct.
        For good or ill, that’s how it is designed.

        1 Reply Last reply Reply Quote 1
        • guy038
          guy038 last edited by guy038

          Hello, @b-sethi24, @alan-kilborn and All,

          May be, there is something that I’m missing, but, with N++ version 7.8.8, and the following XML code, inserted in the Macros node of the shortcut.xml configuration file, it works quite nice ! ?

                  <Macro name="Copy BOOKMARKED lines in NEW file" Ctrl="no" Alt="no" Shift="no" Key="0">
                      <Action type="2" message="0" wParam="43019" lParam="0" sParam="" />   <!-- Copy Bookmarked Lines -->
                      <Action type="2" message="0" wParam="41001" lParam="0" sParam="" />   <!-- New                   -->
                      <Action type="0" message="2179" wParam="0" lParam="0" sParam="" />    <!-- Paste                 -->
                  </Macro>
          

          Best Regards,

          guy038

          1 Reply Last reply Reply Quote 0
          • guy038
            guy038 last edited by

            Hello, @b-sethi24, @alan-kilborn and All,

            Strange ! No answer regarding my assertion / question !

            Cheers,

            guy038

            PeterJones 1 Reply Last reply Reply Quote 0
            • PeterJones
              PeterJones @guy038 last edited by

              @guy038 said in Can we use "Copy Bookmarked Line" and "Paste in ReplaceWith" field in Macro:

              Hello, @b-sethi24, @alan-kilborn and All,

              Strange ! No answer regarding my assertion / question !

              Cheers,

              guy038

              I think you may have understood the original question differently than @Alan-Kilborn did. I made a similar interpretation at first, until I tried to figure out why Alan thought it wasn’t doable, when I original did. Re-reading the original post, I determined the key point was “Pasting in ReplaceWith field”.

              At first, like you, I thought @B-Sethi24 just wanted to paste the bookmarked lines in the document – in which case, the macro you showed would work.

              But if they really want to paste it into the REPLACE WITH field, with all the options available in the dialog box (including regex processing on the REPLACE WITH value), that cannot be done. (For example, if the line ${1} to ${10} were bookmarked, and they wanted to use that as the REPLACE WITH in a regex replacement.)

              Since @B-Sethi24 hasn’t come back since, I doubt we’ll get clarification anytime soon.

              1 Reply Last reply Reply Quote 3
              • First post
                Last post
              Copyright © 2014 NodeBB Forums | Contributors