Community

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

    is the macros number limit to 200?

    Help wanted · · · – – – · · ·
    3
    9
    1557
    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.
    • imdjs
      imdjs last edited by imdjs

      although I can set more the 200 number of macros ,but the macros that after 200 number doesn’t work.

      1 Reply Last reply Reply Quote 1
      • Scott Sumner
        Scott Sumner last edited by Scott Sumner

        I tested this with N++ v.7.5.8 x64 and agree with @imdjs 's findings. [I also think that 200 is a whole lotta macros…I have been using N++ for a long time and only have 24 in MY macros list…]

        I’m sure I could have looked at the N++ source to answer this question, but I wanted to see for myself what it would do with this many macros…

        I created the text for 300 macros (with which I used ~205 for copying into shortcuts.xml) with this Python / Pythonscript code:

        zzz = '''<Macro name="T@%$" Ctrl="no" Alt="no" Shift="no" Key="0">
            <Action type="1" message="2170" wParam="0" lParam="0" sParam="@" />
            <Action type="1" message="2170" wParam="0" lParam="0" sParam="%" />
            <Action type="1" message="2170" wParam="0" lParam="0" sParam="$" />
            <Action type="1" message="2170" wParam="0" lParam="0" sParam="&#x000D;" />
            <Action type="1" message="2170" wParam="0" lParam="0" sParam="&#x000A;" />
        </Macro>
        '''
        
        with open('temp.txt', 'w') as f:  # will create file in npp base folder with local install
            for i in range(3):
                for j in range(10):
                    for k in range(10):
                        zzz2 = zzz.replace('@', str(i))
                        zzz2 = zzz2.replace('%', str(j))
                        zzz2 = zzz2.replace('$', str(k))
                        f.write(zzz2)
        
        1 Reply Last reply Reply Quote 1
        • imdjs
          imdjs last edited by

          thank you for reply
          200 number macros is not enough for me,I need to give up a lot of macros to limit to 200.
          macros.jpg

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

            I think 500 limitation is enough.

            Scott Sumner 1 Reply Last reply Reply Quote 0
            • Scott Sumner
              Scott Sumner @imdjs last edited by Scott Sumner

              @imdjs

              I guess you’ll have to make a feature request for it. You might also want to check out one of the “snippets” plugins.

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

                I did a bit of searching in the code:
                https://github.com/notepad-plus-plus/notepad-plus-plus/blob/89fbbad94e50e168c00ffa2ef3273f9cb4f3e3ba/PowerEditor/src/resource.h#L217

                It looks like #define ID_MACRO_LIMIT being 200 more than #define ID_MACRO is the culprit.

                Scott Sumner 1 Reply Last reply Reply Quote 1
                • Scott Sumner
                  Scott Sumner @PeterJones last edited by

                  @PeterJones

                  And it appears there is room for 1000 macros without changing anything else.

                  And I have 24…somehow I feel, well…inadequate now… :-)

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

                    I only have … well, it says 7, but 5 were ones that I made exclusively when debugging macro recording issues for this forum. Of the 2 real ones, only 1 do I use, and the other is an extended version of that used macro, which I never got in the habit of using.

                    So, if @imdjs just suggests increasing ID_MACRO_LIMIT to 20999 in the feature request, that should solve the superficial problem.

                    Though based on the screenshot provided, it looks like most of the macros are likely typing macros (ie, code snippets). I wonder if one of the Snippet plugins (search the forum, or look in the plugin manager) might handle that feature better than Macros for the OP.

                    1 Reply Last reply Reply Quote 2
                    • imdjs
                      imdjs last edited by

                      thank you I will try the “snippets” plugins.

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