"hide lines" command not working in a Macro



  • Hello everybody

    There’s something that I would like to do in Notepad++ which is being able to fold (or collapse if you prefer) java stack traces in a log file (I really don’t like to go through all those rarely useful lines)
    I’ve tried using “code folding” with no luck as it’s hard to define start and end of a Java stack trace.
    So I’d like to be able to use a macro to search and select each java stack trace through the log file and hide those selected lines (with right click -> hide lines or view menu -> hide lines)…

    Now my problem is that “hide line” command is not recorded in the macro (if I play it again once recorded hiding doesn’t occur).

    Please, do someone knows if there is a workaround or if it’s someone really impossible to do in Notepad++ ?
    (maybe it’s the same for all “view” menu commands in macros ?)

    Thanks for your help



  • OK I found out by myself
    Some commands are not well supported by macros but it’s possible to add them manually via editing shortcut.xml file

    see n++ doc : http://docs.notepad-plus-plus.org/index.php/Editing_Configuration_Files#.3CMacros.3E

    In my case I wanted code “44042” which is “Hide Lines” in the menu (used Resource Hacker to check the menu entry code).

    excerpt of my new shortcuts.xml file :
    <Macros>
    <Macro name=“test RDUV” Ctrl=“no” Alt=“yes” Shift=“yes” Key=“84”>
    <Action type=“2” message=“0” wParam=“44042” lParam=“0” sParam="" />
    </Macro>


Log in to reply