Macros don't work



  • 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 :)



  • @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?



  • @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.



  • @Santiago-Quintero

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



  • 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



  • @Santiago-Quintero

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



  • @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



  • @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



  • 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.



  • <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



  • 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.



  • 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?



  • @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.


Log in to reply