Community
    • Login

    Macros don't work

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    macromacro
    13 Posts 4 Posters 2.4k 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.
    • Santiago QuinteroS
      Santiago Quintero
      last edited by

      Hi everybody, i’m new with notepad++ and i’ve got a particular problem, i didn’t find something in internet that can help, so i need your help. When i want to create a new macro, everything is fine, i save, and i can use the macro in my project, till i turn off my pc and turn on again, when i do that my macro doesn’t work anymore, i tried go to the document in appdata/notepad++/shorcuts, but i didn’t know what supposed i should do.
      thanks :)

      EkopalypseE 1 Reply Last reply Reply Quote 1
      • EkopalypseE
        Ekopalypse @Santiago Quintero
        last edited by

        @Santiago-Quintero

        when you saved your macro you gave it a meaningful name, didn’t you?
        Once this is done you will find the macro saved with this name in the menu Macro, is it there?

        1 Reply Last reply Reply Quote 1
        • Santiago QuinteroS
          Santiago Quintero
          last edited by

          @Ekopalypse
          Yes, i named the macro, and it is the in the Macro menu
          the thing is that when i turn off the computer then it doesn’t work, it’s like if i never saved it, it’s an empty space.

          EkopalypseE 1 Reply Last reply Reply Quote 2
          • EkopalypseE
            Ekopalypse @Santiago Quintero
            last edited by

            @Santiago-Quintero

            would you mind posting your debug-info from the ? menu (the last menu item) ?

            1 Reply Last reply Reply Quote 2
            • Santiago QuinteroS
              Santiago Quintero
              last edited by

              Notepad++ v7.7.1 (64-bit)
              Build time : Jun 16 2019 - 21:24:47
              Path : C:\Program Files\Notepad++\notepad++.exe
              Admin mode : OFF
              Local Conf mode : OFF
              OS : Windows 10 (64-bit)
              Plugins : mimeTools.dll NppConverter.dll PreviewHTML.dll

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

                @Santiago-Quintero

                How about posting the section of shortcuts.xml that defines your macro?

                1 Reply Last reply Reply Quote 2
                • Santiago QuinteroS
                  Santiago Quintero
                  last edited by Santiago Quintero

                  @Alan-Kilborn
                  how could i post my section ? theres no option for post images, sorry for my ignorance, i m new in the forum too

                  EkopalypseE 1 Reply Last reply Reply Quote 0
                  • EkopalypseE
                    Ekopalypse @Santiago Quintero
                    last edited by

                    @Santiago-Quintero

                    it might be easier to just copy and paste? :-)
                    I would put three tildes before your pasted text and three afterwards, that ensures
                    that the formatting isn’t lost. Something like ~~~ text ~~~

                    if there is something
                        do something
                    else
                        go get a cup of coffee
                    

                    In order to link to an image the sytanx is ![](web address to an image)
                    like ![](https://notepad-plus-plus.org/community/uploads/system/site-logo.png) to show

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

                      But don’t ever do an image of text/code, please!
                      If someone can’t copy and paste it to try it out, the likelihood of you getting the help you want goes way down!

                      BTW, the syntax ~~~ your text here ~~~ (all on one line) doesn’t quite work; you need to do:

                      ~~~
                      your text here
                      ~~~

                      which will render verbatim with the black background rectangle.

                      1 Reply Last reply Reply Quote 3
                      • Santiago QuinteroS
                        Santiago Quintero
                        last edited by

                        <NotepadPlus>
                            <InternalCommands />
                            <Macros>
                                <Macro name="Trim Trailing Space 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 Space 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>
                                <Macro name="html" Ctrl="yes" Alt="no" Shift="yes" Key="69">
                                    <Action type="0" message="2179" wParam="0" lParam="0" sParam="" />
                                </Macro>
                                <Macro name="html structure" Ctrl="yes" Alt="no" Shift="yes" Key="78">
                                    <Action type="0" message="2178" wParam="0" lParam="0" sParam="" />
                                    <Action type="0" message="2179" wParam="0" lParam="0" sParam="" />
                                </Macro>
                            </Macros>
                            <UserDefinedCommands>
                                <Command name="Get PHP help" Ctrl="no" Alt="yes" Shift="no" Key="112">http://www.php.net/$(CURRENT_WORD)</Command>
                                <Command name="Wikipedia Search" Ctrl="no" Alt="yes" Shift="no" Key="114">https://en.wikipedia.org/wiki/Special:Search?search=$(CURRENT_WORD)</Command>
                                <Command name="Open file in another instance" Ctrl="no" Alt="yes" Shift="no" Key="117">$(NPP_FULL_FILE_PATH) $(CURRENT_WORD) -nosession -multiInst</Command>
                            </UserDefinedCommands>
                            <PluginCommands />
                            <ScintillaKeys />
                        </NotepadPlus>
                        

                        Ok, that´s my document

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

                          I am assuming the html and html structure documents are the ones you recorded and saved – and I assume right now, you are just using the copy/paste and paste as the recorded macros for simplicity’s sake…

                          Now, after you exit out of Notepad++ and go back in (or reboot, or whatever), are those macros still in your Macros menu? And does your shortcuts.xml still show those macros, or have they been deleted?

                          If they are still there, do they work? Make a selection, then do Macros > html structure to copy and paste. Then Macros > html to just paste again.

                          1 Reply Last reply Reply Quote 1
                          • Santiago QuinteroS
                            Santiago Quintero
                            last edited by

                            Ok, i did all of you said me.When i recorded those macros i just copy and paste for comfort, all of my macros still there, but how i said before it’s an empty space, and it do too in shortcut.xml, macros don’t save copy and paste things, because of that it doesn’t work, why does it happen?

                            EkopalypseE 1 Reply Last reply Reply Quote 0
                            • EkopalypseE
                              Ekopalypse @Santiago Quintero
                              last edited by

                              @Santiago-Quintero

                              let us try something different, goto https://notepad-plus-plus.org/download/v7.7.1.html and download one of the portable versions, the zip package or 7z package. You DON’T have to uninstall the current version just make sure, that you don’t have your current version running when redoing the test with the macros. If this works, then I suspect something corrupted your config files.
                              So, the steps are

                              • download a portable version
                              • unpack it where ever you want
                              • make sure the installed version is not running
                              • start npp from the downloaded package
                              • create you macro and check if it works
                              • stop npp and restart npp and see if the macro still works.

                              If this doesn’t work, then you need to explain in details what exactly you did in each step described above.

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