Community
    • Login

    Macro shortcut breaks after update

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    7 Posts 3 Posters 822 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.
    • deleeleeD
      deleelee
      last edited by deleelee

      I have a macro and I’ve assigned a shortcut for it. It inserts a solid black circle with a space after it, and the shortcut is Ctrl+. (The full stop is part of the shortcut.)

      I use the portable zip version of Npp so whenever I update I skip extracting the shortcuts.xml file to preserve my macros and shortcuts. All of them work fine after updating except for the circle shortcut. After updating, it no longer inserts the circle. Instead, it inserts the unicode hex character code from the xml file. The code is as follows but I’ve inserted a space between the first two characters otherwise the circle is what you’ll see: & #x25CF;

      I haven’t been able to figure out what causes it so, after updating, I have to delete the macro, re-record the macro and re-assign the shortcut. I’m kind of guessing that it may have something to do with a file other than the shortcuts one but if anyone can tell me for sure, I’d be very grateful.

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

        @deleelee

        You probably want to see the FAQ, HERE.

        deleeleeD 2 Replies Last reply Reply Quote 4
        • deleeleeD
          deleelee @Alan Kilborn
          last edited by deleelee

          @Alan-Kilborn said in Macro shortcut breaks after update:

          @deleelee

          You probably want to see the FAQ, HERE.

          Thank you so much! After reading the FAQs I did recall having read that but completely forgot about it by the time I got around to updating.

          1 Reply Last reply Reply Quote 0
          • deleeleeD
            deleelee @Alan Kilborn
            last edited by deleelee

            @Alan-Kilborn said in Macro shortcut breaks after update:

            @deleelee

            You probably want to see the FAQ, HERE.

            After checking all my other macros, I discovered that the one I have that has " and ’ as replacements didn’t work when I replaced the XML entities with the literal characters. In fact it broke the shortcuts file so that none of my macros were displayed in the Macro menu. I thought I must have done something wrong so I re-recorded the macro and discovered it was still stored as the XML entities. Are " and ’ not special characters?

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

              @deleelee ,

              I cannot test right now, but if you can break up you text into sections, I think you can use sParam='"' (single, double, single) for getting the double quote in your macros. I think the string portions that have only single quotes will go fine in the normal attribute value syntax.

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

                Good News

                I ran some experiments: the following macro works the same in v8.5.2 (the last version before the macro change) and v8.5.3 and v8.5.4.

                        <Macro name="XML Named Entities" Ctrl="no" Alt="no" Shift="no" Key="0">
                            <Action type="1" message="2170" wParam="0" lParam="0" sParam="&amp;" />
                            <Action type="1" message="2170" wParam="0" lParam="0" sParam="&lt;" />
                            <Action type="1" message="2170" wParam="0" lParam="0" sParam="&gt;" />
                            <Action type="1" message="2170" wParam="0" lParam="0" sParam="&apos;" />
                            <Action type="1" message="2170" wParam="0" lParam="0" sParam="&quot;" />
                            <Action type="1" message="2170" wParam="0" lParam="0" sParam="&#x0D;" />
                            <Action type="1" message="2170" wParam="0" lParam="0" sParam="&#x0A;" />
                        </Macro>
                

                This means that the five predefined XML named entities all work, as do the two-hex-digit entities for CR and LF (and, not shown, a test of all the two-hex-digit entities for visible ASCII characters from &#x20; through &#x7E all work as well). So this is going to make your job even simpler: to include a quote mark inside the sParam, you can encode it as sParam="&quot;" or as sParam="&#x22;" . I wil be updating the FAQ shortly.

                deleeleeD 1 Reply Last reply Reply Quote 4
                • deleeleeD
                  deleelee @PeterJones
                  last edited by deleelee

                  @PeterJones said in Macro shortcut breaks after update:

                  Good News

                  I ran some experiments: the following macro works the same in v8.5.2 (the last version before the macro change) and v8.5.3 and v8.5.4.

                  This means that the five predefined XML named entities all work, as do the two-hex-digit entities for CR and LF (and, not shown, a test of all the two-hex-digit entities for visible ASCII characters from through ~ all work as well). So this is going to make your job even simpler: to include a quote mark inside the sParam, you can encode it as sParam=""" or as sParam=""" . I wil be updating the FAQ shortly.

                  Thanks Peter 🙂

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