is the macros number limit to 200?

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

  • 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;" />
    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))

  • 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.

  • I think 500 limitation is enough.

  • @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.

  • I did a bit of searching in the code:

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

  • @PeterJones

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

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

  • 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.

  • thank you I will try the “snippets” plugins.

Log in to reply