• Automated Search & Replace help please

    3
    0 Votes
    3 Posts
    295 Views
    Ramses505R

    @alan-kilborn said in Automated Search & Replace help please:

    s = l.rstrip(‘\n\r’).split(‘#’)

    Hi alan-kilborn, thanks so much for the help. In my simple test, that does solve the problem, appreciated.

    I will now give it a try for real and no doubt realise a few further issues.

    Thanks again.

  • The replacement of the number X with a random number in an interval

    12
    0 Votes
    12 Posts
    3k Views
    David CostacheD

    @peterjones Oh, you are perfectly right. I have begun to run the script with my own python.exe
    It functioned perfectly what @Ekopalypse has told me. Likewise, I have had one more problem, but I have realised what I was doing wrong. When I was saving the script, I was saving it anywhere else other than in *\Notepad++\plugins\PythonScript\scripts and it was not showing up in my PythonScript script menu. I thank the two of you very much.

  • CSVQuery doesn't work with Notepad++ 64 bit?

    3
    0 Votes
    3 Posts
    464 Views
    Terry RT

    @terry-r said in CSVQuery doesn't work with Notepad++ 64 bit?:

    If using the latest version you may be seeing the situation where lots of plugins no longer work, see this announcement.

    A quick search of this forum found this post. So it appears the CSVQuery plugin hasn’t been updated for the latest version of Notepad++. However there appears to be another plugin which may fill the gap. Have a read.

    Terry

  • Python script cursor position

    6
    0 Votes
    6 Posts
    1k Views
    Alan KilbornA

    An additional tip – don’t know how many scripters know this – is to put your caret on an Editor or Notepad function and invoke the context-sensitive help that Peter mentioned.

    So, for example, if you have editor.gotoPos( in your code, and you put your caret somewhere in that text, and run the help, the documentation for that function will open in your default browser:

    d86e2026-3753-49cd-a643-003371c51cc9-image.png

    Invoking the context help can be done on the PythonScript plugin menu (see near the bottom):

    4b3859de-2bc8-499a-b7cd-f4f74d015cd5-image.png

    As shown, I like to assign the Ctrl+F1 shortcut to it; by design it doesn’t have a shortcut key.

  • Change values

    2
    0 Votes
    2 Posts
    280 Views
    PeterJonesP

    @memole1990 ,

    First off, Notepad++ has two plus characters at the end of the name; that differentiates it from the “Microsoft Notepad” app that ships with your OS.

    The algorithm you described (which I would phrase “look for a line which starts with 200 05914 then has a third ‘word’ on the line of an 8 digit number representing the date in yyyymmdd format, then compare that date to March 31, 2022, then delete that line and one other line if the date is after March 31, or keep it if it’s on-or-before that threshold”. (*: For that “one other line”, you give the example of 200 05978, but you don’t tell us exactly the rule for that second line, whether it’s always 3 lines below the 200 05914 line, or whether it always starts with 200 05978 no matter where in the file after the date line, or whether it’s always exactly 200 05978 0000 and nothing else would match and thus be deleted).

    That algorithm includes a numeric comparison (whether it literally compares the yyyymmdd 8digit numbers, or whether it compares the underlying date in some other manner)… but unfortunately for your desire, the Notepad++ search/replace syntax (including the ultra-powerful regular expression syntax) doesn’t do numerical or date comparisons, it is just looking for patterns of strings.

    Thus, your task cannot be reasonable accomplished natively in Notepad++. (I say “reasonably”, because with a complicated enough comparison pattern, you could effectively implement a single numerical comparison in a huge regular expression, but it might not fit within Notepad++ ~2000 character regular expression limit.)

    If I were solving this task for myself, I would just write a program to do it in my favorite interpreted programming language. If I were solving this problem for someone who didn’t know any programming languages, but they were willing to install a plugin for Notepad++, I would have them install the PythonScript plugin, and I would give them a short script that would do pattern matching to find the 200 05914 yyyymmdd line, then do the numeric comparison in the python, then if it passes the deletion rule, delete the two lines. But before coding something up for someone else, I would insist upon a clear definition that got rid of the ambiguities I mentioned earlier.

  • PowerShell Send-MailMessage syntax highlighting

    2
    0 Votes
    2 Posts
    230 Views
    Paul WormerP

    @marcelo-finkielsztein
    From PowerShell Get-Help:

    > [!WARNING] > The `Send-MailMessage` cmdlet is obsolete. This cmdlet does not guarantee secure connections to > SM TP servers. While there is no immediate replacement available in PowerShell, we recommend you do > not use `Send-Ma ilMessage`. For more information, see > Platform Compatibility note DE0005 (https://aka.ms/SendMailMessage).
  • Excel VBA copy to NP++ dword is garbled, vice versa

    4
    0 Votes
    4 Posts
    476 Views
    bwiselyB

    thanks your help for the deltail.
    copy the raw data from exvel VBA or notepad++ copy and paste into excel vba are same problems.

    I will try to via MS notepad to notepad++ to solve this problem.

    thanks

  • Sorting or searching for a language in the style configurator

    4
    0 Votes
    4 Posts
    504 Views
    deleeleeD

    @wanderinformatiker

    I use v8.3.3 32-bits and apart from Global Styles, which is at the top of the list, and Search Results, which is at the bottom of the list, all the languages are in alphabetical order.

  • command line sftp auto-connect

    5
    0 Votes
    5 Posts
    488 Views
    Jimmy DevineJ

    @PeterJones that looks like what I’m looking for. I’ll have to read up on integrating npp user parameters with plugins, thanks!

  • non-saved docs are lost if reopen as administrator

    6
    0 Votes
    6 Posts
    567 Views
    oa klkO

    @PeterJones @Alan-Kilborn
    Thanks for looking into it and thanks for the suggestion.

  • AnalysePlugin stopped working after udpate to 8.3.3

    2
    0 Votes
    2 Posts
    559 Views
    PeterJonesP

    @vladimir-zherdenovsky ,

    I don’t think that AnalysePlugin has released a version of their plugin that’s compatible with the changes made in Notepad++ v8.3.3 – there was a slight change to the interface between plugins and Notepad++ made in v8.3.0; many plugins are having to release a new version to make it compatible, and if a plugin doesn’t have an updated version, many old plugins will not work with v8.3.3.

    It looks like AnalysePlugin created a pre-release 01.13-pre1 a few days after NPP v8.3 was released, so if you download the zipfile at https://sourceforge.net/projects/analyseplugin/files/binaries/v01.13-pre1/ and unzip the DLL overtop your old AnalysePlugin.dll, it might be able to work with NPP v8.3.3 for you.

    Good luck

  • ADD A LINE AT THE END

    5
    0 Votes
    5 Posts
    21k Views
    guy038G

    Hi, @memytim19,

    Just look here for documentation

    BR

    guy038

  • Make Apps, not war...

    4
    0 Votes
    4 Posts
    406 Views
    Lycan ThropeL

    @jonathandl2 , Not in mine, with a Firefox browser and the Ad Block Plus installed. :)

    AdsBlockedNPP.PNG

  • How to use Multiple Cursors (aka Multi-Editing) using Keyboard?

    7
    0 Votes
    7 Posts
    14k Views
    AmitA

    @astrosofista @Michael-Vincent, thank you. I will look into this and will try it out. Appreciate it.

  • Always Append Extension

    2
    1 Votes
    2 Posts
    1k Views
    PeterJonesP

    @brian-d ,

    If I type blah with “append extension” enabled, it calls it blah.txt when saved, which is the exact behavior I would desire.

    And in Windows OS, if you type blah. (with the period), that is the way of telling Windows OS “I want the extension portion to be empty: that is, NO EXTENSION, I MEAN IT” … so if the developer were to take your advice, and say “if the user types period, which is the OS’s defined way of specifying no extension, I should ignore the defined behavior and instead use something that is completely nonstandard after 30+ years of DOS/Windows backward compatibilty”, that seems a rather strange option. Especially since all you have to do is not type the period if you want Notepad++ to apply the extension.

    If you mean, "I want to enter blah.xyz, and have it save it as blah.xyz.txt, then at that point, just type a couple extra characters. It’s not that onerous: but that’s just my opinion – and since this Community Forum is made up of users, and is not official feature-request tracking, that’s all you will get here in the forum, is opinions and workarounds; the FAQ in the forum explains where to go for actually submitting a feature request to the development team.

  • 0 Votes
    4 Posts
    422 Views
    PeterJonesP

    @niente0 ,

    The default Dark Mode theme has the active tab highlight as not a huge difference from the background color, but it makes more contrast than your screenshot shows, at least to my eyes:
    9a989085-efbc-46bb-9fd8-6cdb0bd6f773-image.png

    Maybe you’ll want to start with that theme, rather than starting with “black board” (because “black board”, and the rest of the classical darker themes, were designed with the light UI in mind; default-dark-mode is the only theme that was designed with the Dark Mode UI in mind).

    But yes, as of now, the Document List “highlight” background involves interpolating between the current Settings > Style Configurator > Global Styles > Default Style > Background colour and black… so when Background colour is very dark, there isn’t much contrast (and if it’s black, there is no contrast).

    So yes, your suggestion that Notepad++ look at the background color, and determine whether the “active highlight” in the Document List should go darker or lighter is a good one. We cannot do anything about changing the source code here, as a forum made up of the Community of fellow users.

    There may or may not have been an issue created about that before. If you don’t know where Notepad++ issues are tracked, look in the forum’s FAQ section, which will link you there; then you can search the issues for keywords like “dark mode”, “document list”, “background”, “contrast”, and similar terms, and see if it’s been brought up before. (Might want to check active and closed issues, because maybe it’s been asked and rejected)

  • 0 Votes
    2 Posts
    221 Views
    rodica FR

    I think it all happened when I was copying some movies to D:\\, and I didn’t notice it was full HDD

  • Odd margins around window

    8
    0 Votes
    8 Posts
    1k Views
    Graham MeintjesG

    Restarting Slack fixed the problem for me.

    I sent an email to Slack about this behaviour, and added a comment to this GitHub issue: Random Grey areas appear on UI at startup #9717

  • Dark mode

    1
    0 Votes
    1 Posts
    174 Views
    No one has replied
  • Notepad++ stucks on start

    8
    0 Votes
    8 Posts
    4k Views
    gstaviG

    @alex-trefilov
    The problem is probably for files in network shares.
    Notepad++ tries to open a file which its path refers to a network share, Windows tries to reconnect with the shared folder and if the shared server is not accessible, the networking timeout is long until the file open fails. Since Notepad++ is single threaded timeouts for multiple files (mainly on different shares) can accumulate into a very long delay.

    Notepad++ does not know if a path refers to a local file or to a network share so it can’t really do anything about it.

    The only solution I am aware of is to give up the “Remember current session” and let Notepad++ open empty every time.