Categories

  • Announcements regarding our community
    272 Topics
    5k Posts
    PeterJonesP

    @Lycan-Thrope said in Notepad++ v8.7.9 Release Candidate:

    I suspect it may have to do with the recent UI simplification of the Style Configurator feature.

    I am doubtful of that. The Style Configurator UI just moved the graphical elements and changed from a treeview to a combobox; that doesn’t change how it interprets the color settings in any way, shape, or form.

  • Frequently Asked Questions and Guides (about Notepad++ and this Forum)

    36 Topics
    59 Posts
    PeterJonesP
    SubFAQ: Using Plugin Commands in Macros

    Plugin commands (even for the default plugins, like MIME Tools) are not macro-recordable. However, with a bit of effort on your part, they can be macro-playable (with some limitations).

    The reason that they aren’t macro-recordable is that macros make use of the menu command ID for storing which command to use. For built-in menu commands, those commands all have a fixed ID, so from one run of Notepad++ to the next, they will always keep the same menu command ID. Since the plugins available and taking up menu space can be different from run-to-run in Notepad++, the application actually assigns the menu command IDs for each plugin dynamically. Thus, if you install or upgrade a plugin such that the number of plugin menu commands change, the next time you run Notepad++, other plugins will possibly get different command IDs compared to the previous run (depending on what order Notepad++ processes each of the plugins).

    Due to this dynamic menu command ID, Notepad++ would not be able to guarantee that a command ID it records for the macro would work for the same command the next time Notepad++ is run, and thus does not record macro commands.

    There are two workarounds:

    Use a scripting plugin (like PythonScript) instead of Macros to do your automation (because scripting plugins usually have helper commands that can search through the menu to be able to run even plugin menu commands). This adds overhead, and you might have to learn a new programming language, but it gives you a lot more power.

    Cheat the macro system. This will be described below, but has the downside that you have to manually edit the macro XML, and you might have to tweak it if you install or upgrade plugins.

    How to Cheat the Macro System

    As I said earlier, the macros are dynamic, depending on the order that Notepad++ processes the plugins and how many menu commands each plugin uses. However, for any stretch of time where you don’t install any new plugins or upgrade existing plugins, Notepad++ will process your plugins in the same order, so they will get the menu command IDs for each run.

    So to cheat the macro, you can snoop to find the current menu command ID for each action, then manually edit the macro’s XML, then restart Notepad++, and the macro should work until the next time you install or update a plugin.

    Let’s assume that you want to have a macro that will Select All, then Plugins > MIME Tools > Base64 Encode with Padding, then Select All, then Copy the results to the clipboard. (inspired by this discussion). Record this sequence and save it as RecordedMacro with no assigned keyboard shortcut. (Just for this example; the names and shortcuts are obviously up to you for your real task.)

    To snoop the menu command ID, I recommend the NppUISpy plugin. So install that plugin, then run it’s Spy! command (either from its menu or toolbar icon).

    For example, with my current plugins, Spy! tells me that Base64 Encode with Padding is Command Id = 22064

    Open %AppData%\Notepad++\shortcuts.xml and edit your recorded macro.

    It would start out as something like this:<Macro name="RecordedMacro" Ctrl="no" Alt="no" Shift="no" Key="0"> <Action type="0" message="2013" wParam="0" lParam="0" sParam="" /> <Action type="0" message="2013" wParam="0" lParam="0" sParam="" /> <Action type="0" message="2178" wParam="0" lParam="0" sParam="" /> </Macro> That is the Select All command twice and the copy (skipping the plugin command between the two Select All. You would need to edit it to be like:<Macro name="RecordedMacro" Ctrl="no" Alt="no" Shift="no" Key="0"> <Action type="0" message="2013" wParam="0" lParam="0" sParam="" /> <Action type="2" message="0" wParam="22064" lParam="0" sParam="0" /> <Action type="0" message="2013" wParam="0" lParam="0" sParam="" /> <Action type="0" message="2178" wParam="0" lParam="0" sParam="" /> </Macro> which puts the 22064 that I found with NppUISpy in between the two Select All instances. Please note that many recorded editor commands (like copy, paste, home, etc) will be type="0" with the scintilla command in the message="..." field; whereas menu commands like the plugin command will be type="2" and put the menuCommandID into the wParam="###" field. See the user manual’s <Macro><Action> details for more. Save the shortcuts.xml and restart Notepad++.

    At this point, running your macro should do the select all, the conversion, the select all, and the copy.

    The next time you installed or upgraded a plugin, you would need to re-run Spy!, and check whether the command ID has changed; if it has, edit shortcuts.xml again, and replace the example 22064 with the new number.

  • Notepad++ discussions that don’t fit in other Categories

    4k Topics
    21k Posts
    Alan KilbornA

    @Laur-Florin

    Just curious… The batch file makes use of a lot of powershell. Why did you decide to make it a hybrid batch/powershell script instead of going 100% powershell?

  • 10k Topics
    52k Posts
    PeterJonesP

    @peter-vasil said in Style/theme settings lost on every N++ update:

    I just had this issue, but I found what I think is the issue and solution everyone here had and wanted to help future users. notepad ++ doesn’t import the themes after updating (don’t know why for other but for me it is due to the fact I use the no %appdata% mode ) but they still exist and you just have to move them around to where they should be for it to work. this fixed it for me

    Specifically, Notepad++ doesn’t overwrite any of your existing themes so that your customizations don’t get overwritten; this logic is to prevent the “style/theme settings lost on every N++ update”.

    If it worked for you, great. But in general, people shouldn’t be surprised if they follow your advice of copying the theme data from somewhere else on top of their own customized version of the theme, they will lose their customizations.

  • Technical discussion of building or contributing to Notepad++ or Plugin codebases

    1k Topics
    8k Posts
    PeterJonesP

    @remotemachining ,

    First, the user you @-mentioned was just a random user who had commented, and is not the same as the person who announced the plugin. The user you mentioned hasn’t been here since making the post in January 2024; and the user who announced the MarkdownText plugin hasn’t been here sincec 2021 (nor have there been any updates to that plugin since that year). I am doubtful that you’d get a response from either of them.

    On to the specifics of your issue:

    Where did you download the plugin? Did you use a specific URL (if so, share it), or did you just use Plugins Admin?

    I ask, because this discussion is about the MarkdownText plugin, which would show up as MarkdownText.dll, but the error messages you typed out are referencing a plugin directory NppMarkdownPanel (which implies the NppMarkdownPanel.dll) but referencing a DLL in a lib sub-directory called MarkdigWrapper.dll – that’s not the normal way that Notepad++ plugins are set up (unless this plugin has multiple DLLs involved, and it’s just having a problem with one of them).

    However, your messages imply you are actually using a different plugin, NppMarkdownPanel which is available in the Plugins Admin inside Notepad++, and has been updated much more recently… Assuming that’s the case, I tried installing that plugin and looking at a simple Markdown file: I, too, get an error message about that MarkdigWrapper.dll sub-library. Looks like there’s a major bug that’s making it incompatible.

    I went to the most-recent issue that they said they closed, and the people testing the build were using Notepad++ 8.4.9 to do the testing (which would have been current in early 2023, when the last plugin release was made). And I still get the error with plugin v0.7.3 and NPP-64 v8.4.9. I also tried, with the same error, in the 32bit Notepad++/plugin combo.

    However, if I instead grab plugin v0.7.0 (which is the version from Plugins Admin) in the 32bit, it works properly for me. And if I use Plugins Admin in 64bit Notepad++ and download the one there (which says 0.7.1 in the dialog, but the plugin’s About box only says 0.7.0), it also works.

    So if you downloaded directly from github, try removing the manual installation of the plugin, and instead install using Plugins Admin, and there’s a good chance it will start working for you.

    I personally chose the MarkdownViewer++ plugin (0.8.2) from Plugins Admin, and that one works reliably for me. But I do readily admit it hasn’t been updated since 2018, so is obviously not supported anymore.

  • Security shouldn't be the privilege of rich people
    49 Topics
    195 Posts
    dinkumoilD

    @Emmanuel-Meekers
    AFAIK there is no technical means to limit the number of plugins a user is able to install. You can only remove the capability to install plugins at all.

    You could do a survey which plugins your employees need. There can be different needs, e.g. technical staff likely needs other plugins than employees that ar more involved in administrative tasks. Then you can install these plugins on the employee’s machines.

    After that you need to rename or delete <install-directory>\updater\GUP.exe to prevent users from installing any other plugins. As long as your employees don’t have admin access to Notepad++'s install directory, they are not able to revert these changes.

    The disadvantage is that your users neither will be able to update Notepad++ itself nor the installed plugins. This is something your ICT department has to do.

  • All the issues (publications/questions) about binary translation
    72 Topics
    457 Posts
    Richárd StockingerR

    Hi!

    I’ve updated the Hungarian language file to be compatible with the latest version (8.7.1) of Notepad++.

    This is a major, complete and up-to-date re-translation of this file, including:

    Translating the missing terms Adding missing accelerator letters (also for dialogs) Correcting the previous spelling errors (e.g. capitalization) Re-translating the inaccurate expressions more accurate Re-translating the outdated terms

    Pull request: #15824

  • Say fuck to Notepad++ here, and only here
    82 Topics
    511 Posts
    Patriot KielerP

    Hello, Has Notepad++ become a political organization?

    https://notepad-plus-plus.org/news/v878-we-are-with-ukraine/

    Ukraine has been at war since prior to 2014. I was curious as to why notepad++ feels the need to slander President Donald Trump.

    I am a US Army Veteran and the days of us paying for conflicts we have no business being involved with need to come to an end.

    These conflicts about Ukraine joining UN goes back to the original agreement with USSR and NATO. NATO has left being peaceful and has slowly violating the agreement to not move further east to Russian Territory. Scott Ritter is a former UN Weapons Inspector who exposed the lies in Iraq. He told the world that Saddam Hussein didn’t have weapons of mass destruction. Powerful people in Washington didn’t want to hear it and he resigned in protest. The War in Iraq cost millions of lives and trillions of dollars. Now Ritter is revealing the truth about the latest U.S. military incursions in Ukraine, Syria, and beyond. https://youtu.be/C5zwwIUKOsM

  • Blog posts from individual members
    56 Topics
    211 Posts
    barisusakliB

    Should be fixed now, thanks for reporting!

  • Computer/Programming Jokes are welcome here

    46 Topics
    141 Posts
    Terry RT

    my-code-doesnt-work-lets-change-nothing-and-runit-again.png

    9999.jpeg