• Login
Community
  • Login

is the macros number limit to 200?

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
9 Posts 3 Posters 2.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.
  • I
    imdjs
    last edited by imdjs Sep 9, 2018, 6:27 AM Sep 9, 2018, 6:25 AM

    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
    • S
      Scott Sumner
      last edited by Scott Sumner Sep 10, 2018, 12:08 PM Sep 10, 2018, 12:07 PM

      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
      • I
        imdjs
        last edited by Sep 10, 2018, 8:02 PM

        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
        • I
          imdjs
          last edited by Sep 10, 2018, 8:12 PM

          I think 500 limitation is enough.

          S 1 Reply Last reply Sep 10, 2018, 8:38 PM Reply Quote 0
          • S
            Scott Sumner @imdjs
            last edited by Scott Sumner Sep 10, 2018, 8:40 PM Sep 10, 2018, 8:38 PM

            @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
            • P
              PeterJones
              last edited by Sep 10, 2018, 8:43 PM

              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.

              S 1 Reply Last reply Sep 10, 2018, 8:46 PM Reply Quote 1
              • S
                Scott Sumner @PeterJones
                last edited by Sep 10, 2018, 8:46 PM

                @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
                • P
                  PeterJones
                  last edited by Sep 10, 2018, 8:54 PM

                  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
                  • I
                    imdjs
                    last edited by Sep 11, 2018, 4:15 AM

                    thank you I will try the “snippets” plugins.

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