Community
    • Login

    Where is the user macro file?

    Scheduled Pinned Locked Moved General Discussion
    19 Posts 5 Posters 3.7k 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.
    • guy038G
      guy038
      last edited by guy038

      Hello, @harry-goldhagen, @peterjones, @alan-kilborn and All,

      @harry-goldhagen said :

      on first glance it seems like a very wordy macro language, with a line per character.

      This sentence caught my attention ! I said to myself: could we put several characters, together, in the same 2170 instruction ?


      For instance this simple text :

      Test
      Second line !
      

      will normally be recorded as :

              <Macro name="Test" Ctrl="no" Alt="no" Shift="no" Key="0">
                  <Action type="1" message="2170" wParam="0" lParam="0" sParam="T" />
                  <Action type="1" message="2170" wParam="0" lParam="0" sParam="e" />
                  <Action type="1" message="2170" wParam="0" lParam="0" sParam="s" />
                  <Action type="1" message="2170" wParam="0" lParam="0" sParam="t" />
                  <Action type="1" message="2170" wParam="0" lParam="0" sParam="&#x000D;" />
                  <Action type="1" message="2170" wParam="0" lParam="0" sParam="&#x000A;" />
                  <Action type="1" message="2170" wParam="0" lParam="0" sParam="S" />
                  <Action type="1" message="2170" wParam="0" lParam="0" sParam="e" />
                  <Action type="1" message="2170" wParam="0" lParam="0" sParam="c" />
                  <Action type="1" message="2170" wParam="0" lParam="0" sParam="o" />
                  <Action type="1" message="2170" wParam="0" lParam="0" sParam="n" />
                  <Action type="1" message="2170" wParam="0" lParam="0" sParam="d" />
                  <Action type="1" message="2170" wParam="0" lParam="0" sParam=" " />
                  <Action type="1" message="2170" wParam="0" lParam="0" sParam="l" />
                  <Action type="1" message="2170" wParam="0" lParam="0" sParam="i" />
                  <Action type="1" message="2170" wParam="0" lParam="0" sParam="n" />
                  <Action type="1" message="2170" wParam="0" lParam="0" sParam="e" />
                  <Action type="1" message="2170" wParam="0" lParam="0" sParam=" " />
                  <Action type="1" message="2170" wParam="0" lParam="0" sParam="!" />
              </Macro>
      

      So, I tried to cut down all this stuff with this version :

              <Macro name="Test_1" Ctrl="no" Alt="no" Shift="no" Key="0">
                  <Action type="1" message="2170" wParam="0" lParam="0" sParam="Test&#x000D;&#x000A;Second line !" />
              </Macro>
      

      And guess what ? It works nicely and this text is kept over N++ sessions, without any problem !

      Note that it works with a very long sentence, too, as in this second test with the Preamble of the N++ license.txt file :

              <Macro name="Test_2" Ctrl="no" Alt="no" Shift="no" Key="0">
                  <Action type="1" message="2170" wParam="0" lParam="0" sParam="The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too." />
              </Macro>
      

      So, one more thing to remember !

      Alan, Peter, I hope that, this time, I don’t relay false news about the configuration file shortcuts.xml. Just experiment my assumption !

      Best Regards

      guy038

      P.S. :

      Very hard to type this message because my pussy has just settled between my keyboard and me ;-)) The naughty one !

      Harry GoldhagenH 1 Reply Last reply Reply Quote 1
      • Harry GoldhagenH
        Harry Goldhagen @guy038
        last edited by

        @guy038 Thanks everyone, lots to learn now! I’m just trying to simply automate web page creation for my static site.

        1 Reply Last reply Reply Quote 0
        • Harry GoldhagenH
          Harry Goldhagen @PeterJones
          last edited by

          @PeterJones I’m unfamiliar with scripting, is this also described in the manual? I have no programming skills, I only use Notepad++ for writing web pages and CSS files, so I’m hoping scripting is a straightforward feature…

          Alan KilbornA 1 Reply Last reply Reply Quote 0
          • Alan KilbornA
            Alan Kilborn @Harry Goldhagen
            last edited by

            @Harry-Goldhagen said in Where is the user macro file?:

            I’m unfamiliar with scripting, is this also described in the manual? I have no programming skills, I only use Notepad++ for writing web pages and CSS files, so I’m hoping scripting is a straightforward feature…

            Because scripting is done with a plugin, it wouldn’t be in the N++ manual.

            If you have “no programming skills”, probably best to stay away from scripting. Unless you have a burning desire to acquire some of those skills.

            Harry GoldhagenH 1 Reply Last reply Reply Quote 3
            • Harry GoldhagenH
              Harry Goldhagen @Alan Kilborn
              last edited by Harry Goldhagen

              @Alan-Kilborn Thanks, looks like I’ll stick to macros! By the way, I must say this is one of the most helpful forums I’ve ever used! The NPP crowd is very helpful. Glad a friend of mine recommended that I use it for html coding.

              Alan KilbornA 1 Reply Last reply Reply Quote 2
              • Alan KilbornA
                Alan Kilborn @Harry Goldhagen
                last edited by

                @Harry-Goldhagen said in Where is the user macro file?:

                Glad a friend of mine recommended that I use it for html coding.

                Just don’t ask your HTML coding questions here!
                We don’t take kindly to that!
                :-)

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

                  @PeterJones said in Where is the user macro file?:

                  @Alan-Kilborn said in Where is the user macro file?:

                  Peter, I don’t know that info currently in the manual is anywhere close to as good as what you (and possibly I, if you agree) have said in this thread.

                  Yep: usermanual issue #139 created and assigned to me.

                  Pull Request #140 submitted.

                  ( @Alan-Kilborn , during my investigation, I confirmed that cloud actually beats doLocalConf, rather than the other way around as you phrased it.)

                  Alan KilbornA 2 Replies Last reply Reply Quote 3
                  • Alan KilbornA
                    Alan Kilborn @PeterJones
                    last edited by

                    @PeterJones said in Where is the user macro file?:

                    I confirmed that cloud actually beats doLocalConf, rather than the other way around as you phrased it.

                    Interesting.
                    It seems like the xml file should beat everything else, but I guess not.
                    At least it is documented well now.
                    Thanks to your efforts.

                    1 Reply Last reply Reply Quote 1
                    • Alan KilbornA
                      Alan Kilborn @PeterJones
                      last edited by

                      @PeterJones

                      More upcoming work for Peter on this: https://github.com/notepad-plus-plus/notepad-plus-plus/pull/9287

                      :-(

                      PeterJonesP 1 Reply Last reply Reply Quote 1
                      • PeterJonesP
                        PeterJones @Alan Kilborn
                        last edited by

                        @Alan-Kilborn said in Where is the user macro file?:

                        :-(

                        It’s only going to be another sentence or two. Not a killer addition. ;-)

                        created usermanual issue #141

                        1 Reply Last reply Reply Quote 1
                        • prahladmifourP
                          prahladmifour
                          last edited by prahladmifour

                          Hello,@Harry-Goldhagen
                          In Windows, the macros are saved at %AppData%\Notepad++\shortcuts.XML

                          Or

                          In Windows < 7 the macros are saved at C:\Documents and Settings%username%\Application Data\Notepad++\shortcuts.xml
                          In Windows 7|8|10 C:\Users%username%\AppData\Roaming\Notepad++\shortcuts.xml
                          Note: You will need to close Notepad++ if you have any new macros you want to ‘export’.

                          I hope this information will be useful to you.
                          Thank you.

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