• Login
Community
  • Login

macro-writing

Scheduled Pinned Locked Moved General Discussion
4 Posts 3 Posters 666 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.
  • K
    khk khk
    last edited by Apr 11, 2020, 9:20 AM

    I know, how to record a macro.

    But where can I find a description of macro parameters (eg. reserved words ) to put macro definitions into shortcut.xml?

    1 Reply Last reply Reply Quote 0
    • G
      guy038
      last edited by Apr 11, 2020, 10:25 AM

      Hello, @khk_khk, and All,

      Here are some links, in the Official Notepad++ documentation :

      https://npp-user-manual.org/docs/macros/

      https://npp-user-manual.org/docs/config-files/#macros

      https://npp-user-manual.org/docs/searching/#searching-actions-when-recorded-as-macros


      Here is my own summary of all the <Action> tags, of type = 3, which define a search/replace operation, in the <Macros> section of shortcuts.xml

      04f88671-864b-4358-8957-ce51671e9704-image.png

      Hope this helps !

      Best Regards,

      guy038

      A 1 Reply Last reply Apr 11, 2020, 12:56 PM Reply Quote 3
      • A
        Alan Kilborn @guy038
        last edited by Apr 11, 2020, 12:56 PM

        But where can I find a description of macro parameters (eg. reserved words ) to put macro definitions into shortcut.xml?

        @guy038’s search/replace info is good…for search/replace.

        Oftentimes a macro action is just a Scintilla command, in which case it comes down to a numeric command that is defined in the source code (file: scintilla.h) starting with SCI_. A good source of available SCI_ commands is on the Scintilla tab page of the Shortcut Mapper.

        I believe also that some menu id (numeric) commands are also recorded into macros. A good reference for this is the source code file menuCmdID.h.

        Probably exhaustive end-user level documentation on all possible commands is beyond the available resources of the Notepad++ dev team. It would be great to have, but…

        I know, how to record a macro.

        This truly is a novice-to-medium-experience end user’s best way to work with macros. If you want to see what results from an action, record and save a simple macro and then look at it in shortcuts.xml 's macro section.

        If you want to hand-edit a slightly bigger macro, put together (textually) several of these little test macros you’ve recorded.

        1 Reply Last reply Reply Quote 2
        • A
          Alan Kilborn
          last edited by Apr 12, 2020, 3:45 PM

          The discussion is continued HERE.

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