Community
    • Login

    How to interpret the coding of macros?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 3.4k Views 1 Watching
    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.
    • GezaShadG Offline
      GezaShad
      last edited by

      I recorded a macro a few months ago, that does find&replace on several items within text files, now I thought, maybe I could add another find&replace string to the same macro, but 1st I would like to understand or better said, interpret the existing code.

      And also, unfortunately I didn’t make notes of what characters can the existing macro replace but now I would like to do it but I just don’t understand a few things in the text of the macro.

      Here is part of the macro, where I numbered each line for easy reference:

      I’m assuming that the “Trim Trailing and save” macro came with Notepad++, since I don’t recall recording it.

      The name of my macro is “Subtitle Mod1”

      I’m asuming that Action type=3 has to do with “find and replace” function

      The 1st find&replace command starts at line #09 and ends with #15
      Basically here I wanted to remove one space after the colon.

      Could someone explain the meaning and/or function of lines #09, #11, #13, #14, #15?

      And am I assuming correctly, that if I want to add another find&replace script to this macro, I just have
      record a new macro with the new stuff and cut&paste the lines of the new macro into the old one?


      01 <NotepadPlus>
      02 <InternalCommands />
      03 <Macros>
      04 <Macro name=“Trim Trailing and save” Ctrl=“no” Alt=“yes” Shift=“yes” Key=“83”>
      05 <Action type=“2” message=“0” wParam=“42024” lParam=“0” sParam=“” />
      06 <Action type=“2” message=“0” wParam=“41006” lParam=“0” sParam=“” />
      07 </Macro>
      08 <Macro name=“Subtitle Mod1” Ctrl=“yes” Alt=“yes” Shift=“no” Key=“53”>
      09 <Action type=“3” message=“1700” wParam=“0” lParam=“0” sParam=“” />
      10 <Action type=“3” message=“1601” wParam=“0” lParam=“0” sParam=“: " />
      11 <Action type=“3” message=“1625” wParam=“0” lParam=“0” sParam=”" />
      12 <Action type=“3” message=“1602” wParam=“0” lParam=“0” sParam=“:” />
      13 <Action type=“3” message=“1702” wParam=“0” lParam=“770” sParam=“” />
      14 <Action type=“3” message=“1701” wParam=“0” lParam=“1609” sParam=“” />
      15 <Action type=“0” message=“2178” wParam=“0” lParam=“0” sParam=“” />
      16 <Action type=“3” message=“1700” wParam=“0” lParam=“0” sParam=“” />
      17 <Action type=“3” message=“1601” wParam=“0” lParam=“0” sParam=“->” />
      18 <Action type=“3” message=“1625” wParam=“0” lParam=“0” sParam=“” />
      19 <Action type=“3” message=“1602” wParam=“0” lParam=“0” sParam=“–>” />
      20 <Action type=“3” message=“1702” wParam=“0” lParam=“770” sParam=“” />
      21 <Action type=“3” message=“1701” wParam=“0” lParam=“1609” sParam=“” />
      22 <Action type=“3” message=“1700” wParam=“0” lParam=“0” sParam=“” />
      23 <Action type=“3” message=“1601” wParam=“0” lParam=“0” sParam=“0.” />
      24 <Action type=“3” message=“1625” wParam=“0” lParam=“0” sParam=“” />
      25 <Action type=“3” message=“1602” wParam=“0” lParam=“0” sParam=“0,” />
      26 <Action type=“3” message=“1702” wParam=“0” lParam=“770” sParam=“” />
      27 <Action type=“3” message=“1701” wParam=“0” lParam=“1609” sParam=“” />

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA Offline
        Alan Kilborn @GezaShad
        last edited by

        @GezaShad said:

        I’m assuming that the “Trim Trailing and save” macro came with Notepad++

        Very true.

        For the rest, I think this link will be of enormous enlightenment for you:
        http://docs.notepad-plus-plus.org/index.php/Editing_Configuration_Files#Search_.2F_Replace_encoding

        1 Reply Last reply Reply Quote 3
        • GezaShadG Offline
          GezaShad
          last edited by

          Alan, Thank You for your answer!

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors