• Login
Community
  • Login

Macros Keep Erasing

Scheduled Pinned Locked Moved General Discussion
macros
9 Posts 3 Posters 5.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.
  • J
    Joelbow
    last edited by Apr 24, 2017, 9:32 AM

    Ok, so I have never had a problem editing my macros file with regular notepad.exe from windows. I normally goto the directory under appdata\users\ etc and right click the shortcuts.xml file and open with notepad.exe when I have notepad++ closed of course. Well, I right-clicked the file and opened it with notepad++ in error. Did nothing to the file. Just closed the program. Restarted it and my macros are all gone, Completely.

    I have tried everything under the sun to restore them. I have always kept a backup file in other directorys in case this ever happened.

    I have tried uninstalling program, changing versions, changing registry data that points to anything related to notepad++

    Still Nothing works. Everytime I change the file, the macros reset to none. I could start over, but I have many macros that I use on a daily basis.

    Any help would be appreciated

    Thanks

    C 1 Reply Last reply Apr 24, 2017, 10:51 AM Reply Quote 0
    • C
      Claudia Frank @Joelbow
      last edited by Apr 24, 2017, 10:51 AM

      @Joelbow
      please post your debug-info.

      Cheers
      Claudia

      1 Reply Last reply Reply Quote 0
      • J
        Joelbow
        last edited by Apr 24, 2017, 10:59 AM

        Thanks for your response Claudia, where do I begin to do that in Notepad++? Windows 8.1

        C 1 Reply Last reply Apr 24, 2017, 11:01 AM Reply Quote 1
        • C
          Claudia Frank @Joelbow
          last edited by Apr 24, 2017, 11:01 AM

          @Joelbow

          Can be found under ? menu.

          Cheers
          Claudia

          1 Reply Last reply Reply Quote 0
          • J
            Joelbow
            last edited by Apr 24, 2017, 11:23 AM

            Notepad++ v7.3.3 (64-bit)
            Build time : Mar 8 2017 - 03:39:58
            Path : C:\Program Files\Notepad++\notepad++.exe
            Admin mode : OFF
            Local Conf mode : OFF
            OS : Windows 8.1 (64-bit)
            Plugins : mimeTools.dll NppConverter.dll

            C 1 Reply Last reply Apr 24, 2017, 11:41 AM Reply Quote 1
            • C
              Claudia Frank @Joelbow
              last edited by Apr 24, 2017, 11:41 AM

              @Joelbow

              If you open %APPDATA%\notepad++\shortcuts.xml,
              you should see at least one entry in macros section

                  <Macro name="Trim Trailing and save" Ctrl="no" Alt="yes" Shift="yes" Key="83">
                      <Action type="2" message="0" wParam="42024" lParam="0" sParam="" />
                      <Action type="2" message="0" wParam="41006" lParam="0" sParam="" />
                  </Macro>
              

              this is the default one which is available after a new install.

              Could you just try to duplicate this entry and give it a different name like

                  <Macro name="Trim Trailing and save" Ctrl="no" Alt="yes" Shift="yes" Key="83">
                      <Action type="2" message="0" wParam="42024" lParam="0" sParam="" />
                      <Action type="2" message="0" wParam="41006" lParam="0" sParam="" />
                  </Macro>
                  <Macro name="Trim Trailing and save2" Ctrl="no" Alt="yes" Shift="yes" Key="83">
                      <Action type="2" message="0" wParam="42024" lParam="0" sParam="" />
                      <Action type="2" message="0" wParam="41006" lParam="0" sParam="" />
                  </Macro>
              

              Save the file - restart npp.
              Btw. you can edit macros within npp.

              Cheers
              Claudia

              1 Reply Last reply Reply Quote 0
              • J
                Joelbow
                last edited by Apr 24, 2017, 11:49 AM

                Ok, well I found the recent macro that I added that was causing all the macros to erase. It may have had some special characters in it causing the macros to crash. That being said, I erased that macro and the rest of them are back up and working. Thanks for helping me out. I have been working on this for days. Even did a system restore etc… and was stumped. I just decided to delete them one at a time. BTW I thought you couldn’t edit the shortcuts.xml file directly while having npp up and running. Am I wrong? Thanks, cheers. Joel.

                C S 2 Replies Last reply Apr 24, 2017, 11:56 AM Reply Quote 0
                • C
                  Claudia Frank @Joelbow
                  last edited by Apr 24, 2017, 11:56 AM

                  @Joelbow

                  good to see that you managed it.

                  BTW I thought you couldn’t edit the shortcuts.xml file directly while having npp up and running. Am I wrong?

                  Not really, it depends which part you modify. Npp saves configuration data when shutting down,
                  macros aren’t part of it.

                  Cheers
                  Claudia

                  1 Reply Last reply Reply Quote 0
                  • S
                    Scott Sumner @Joelbow
                    last edited by Apr 24, 2017, 11:59 AM

                    @Joelbow

                    It’s great that your problem is solved, but if you’d provide more detail on the “special characters” in your macro that caused it to crash, we could think about it further, and maybe learn something we didn’t already know.

                    shortcuts.xml can be edited with Notepad++ as long as you don’t use the Shortcut Mapper functionality to change a shortcut key assignment at the same time (during the same run) as you make other (manual) edits to the file. If you make manual edits AND also use the Shortcut Mapper to make a change during the same run, Notepad++ will (in order to update the key-combo change), write out a new complete copy of shortcuts.xml from what is currently in memory–which will not include any manual edits to the file.

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