• Search for 6 figure string but exclude certain strings

    6
    0 Votes
    6 Posts
    224 Views
    andy souterA

    @andy-souter Yes, found out how to make it work. Excludes the strings i want excluded, but getting new ones not excluded that I did not expect. But I now have a way forward. Thanks for your help.

  • Is it possible to merge two lines in a KML file ?

    6
    0 Votes
    6 Posts
    381 Views
    Josef MoertlJ

    @guy038
    … you guys are really incredible … for me this is another dimension !!! … wow … it worked great !!! … and I hope that your solutions will help many many others … I’m pretty sure about that, as I spent hours !!! trying to find a solution before, as this is not possible with Google Earth and there is no third party software solution yet …
    Thank you so much … ;-)

  • expression for specific words

    8
    0 Votes
    8 Posts
    244 Views
    Mark OlsonM

    @kracovwolf
    \s+ matches any number of whitespace characters.

    I’m not going to give you any more hints on basic regex usage - I will once again recommend that you read the user manual’s topic on regular expressions.

    While learning regular expressions may be slow going (it took me a long time to get where I am now), believe me when I say that (1) it is worth the effort, and (2) you can’t get there by asking others for the answer.

  • Customization

    2
    0 Votes
    2 Posts
    151 Views
    PeterJonesP

    @pianoprofitonal ,

    Create a User Defined Language (UDL) using Language > User Defined Language > Define Your Language, giving the language a name. On the Operators & Delimiters page, put the special characters (space-separated) into the Operators1 box, and use the Operators Styler button to assign the color for the special characters. On the Comment & Number page, use the Number Style’s Styler button to set the color for numbers. And on the Folder & Default page, Default Style, use the Styler button to set the “default” color, which will be the color of all the alphabetic (and unspecified) characters.

    Selecting that UDL from the Language menu (or defining the extension in the UDL, and opening a file with that special extension) will activate that special colorization.

  • Not using %appdata% when installing via CLI

    2
    0 Votes
    2 Posts
    309 Views
    PeterJonesP

    @ITManders said in Not using %appdata% when installing via CLI:

    Is it possible to silent install while also not using %appdata%?

    Sorry, as far as I’ve ever seen, that is not currently one of the installer options. One would have to request that feature by following the instructions in our feature request FAQ

  • Getting my file to turn into a https on the web browser

    2
    0 Votes
    2 Posts
    270 Views
    PeterJonesP

    @sinD1202 ,

    It sounds like you have some fundamental misunderstandings about what’s the difference between HTML, HTTPS, and a URL. I suggest you make an appointment with your class’s professor and ask some meaningful questions, especially as to how to upload the file to the server and how to figure out the URL.

    As it is, your question has nothing to do with Notepad++ – Notepad++ is the tool you use for typing your code; it has nothing to do with the server, or figuring out the URL needed to access a file on your server.

  • Is it possible to merge all text from 1 file with another file

    5
    0 Votes
    5 Posts
    292 Views
    CheapSweetLifeC

    @Coises
    Thank you for the help with all of this I have saved the link to the page you linked to to my bookmarks.

  • Pasting "Alt drag blocks" doesn't work anymore

    6
    0 Votes
    6 Posts
    339 Views
    mkupperM

    @smnokars While Notepad++'s behavior has changed you can get exactly what you desire with a small change on your part.

    Step one remains the same. Use “Alt + Mouse” and “Ctrl + C” to create the selection and to load it into your copy/paste buffer.

    For step two though use Alt+left or regular mouse click at the spot where you want to paste the selection. This will move the text cursor or caret to the indicated spot. Now you can do Ctrl+V to paste and you will get

    123456789_1 123456789_1 12345678 12345678 123456789_12345 123456789_12345 123456789_123456789 123456789_123456789

    You don’t need to create the skinny multi-row selection that matches the number of lines in the paste buffer that you were doing in step 2 before.

    Older versions of Notepad++ also worked this way with using Alt+left mouse click to position the text cursor or caret.

    The behavior change with multi-row selections has to do with what the developer calls multi-caret mode that was introduced in v8.6.

    If you have been using column selections then may want to go to Settings / Preferences / Editing 2 / and to turn off Enable Column Selection to Multi-Editing. That’s one of the new v8.6 features that v8.6 enabled by default. Turning it off restores some of the older behavior though apparently does not fix the issue you brought up here.

  • I need help with downloads

    4
    0 Votes
    4 Posts
    177 Views
    PeterJonesP

    @awmess34x ,

    Okay, you have the NppFTP plugin. That still doesn’t tell us your actual steps that you are using that are resulting in the message.

    You would have to tell us what steps you are actually taking inside Notepad++ (every action that leads up to this problem); it would be good to have the NppFTP Messages window open, and see if it shows any errors during the process, and then tell us about those.

    Without more from you, it’s impossible for me to help you. But maybe someone else can make a guess based on your description and be able to help you without you supply more information (I doubt it, but I’d love to be proven wrong on this).

    Good luck.

  • Pb with search result window

    2
    0 Votes
    2 Posts
    139 Views
    PeterJonesP

    @Drappier ,

    Yes, the search result window is displayed after a global search. You may have just accidentally shrunk it to the point where you don’t notice it, or if it’s undocked, it may have been moved off-screen.

    See our FAQ: I cannot find my panel!

    (There’s actually a proposed fix, submitted yesterday, that will hopefully prevent it from getting too small in the future. But the FAQ will help you for now.)

  • The text editor "blurs" weirder

    5
    0 Votes
    5 Posts
    482 Views
    CoisesC

    @rdipardo said in The text editor "blurs" weirder:

    @mkupper said in The text editor "blurs" weirder:

    Did you see the OP’s tried algo turning “Misc -> Use DirectWrite” on and off, but none of those worked.?

    DirectWrite uses the GPU. When the GPU cranks up the refresh rate (as at least one Intel device is known to do), the edit buffer gets redrawn over and over, at a speed that’s increasingly out of step with Scintilla. It’s happened at least once, and could reasonably be expected to happen again.

    @ezShokkoh:

    Especially since the original poster implied that English is not their first language, it is possible that the original poster did not notice or understand that Notepad++ must be completely closed and then started again for any change in that setting to take effect.

    It’s not enough to toggle the DirectWrite checkbox. You must close and restart Notepad++.

  • how to make tab bar appear vertically in notepad ++

    2
    0 Votes
    2 Posts
    977 Views
    mkupperM

    @kahalahmawad

    Try View / Document List plus in preferences you remove the tab bar.

    Or, you can go with the sideways named vertical tab bar and hover the mouse on a tab and it will show the name horizontally.

  • 0 Votes
    2 Posts
    191 Views
    mkupperM

    @wonkawilly said in css formatting not working on embed style sheet at the begging of the style section in specific cases:

    Someone else can replicate the issue?

    Please post an example for people to experiment with using the </> code thing that’s available in the forums.

  • latest version download url broken

    7
    0 Votes
    7 Posts
    481 Views
    PeterJonesP

    @mkupper said in latest version download url broken:

    At one point within the last year or two donho said that Notepad++'s getDownloadUrl.php was an internal thing. He had not planned on it being used by others. Unfortunately, I can’t find that commen

    here (in the <NeedToBeUpdated> topic already linked), he said,

    https://notepad-plus-plus.org/update/getDownloadUrl.php is internal URL for Notepad++ packages doing self auto-updating, but it not supposed for outside usage (from any individual or IT people of enterprise doing it manually). Therefore no support for the internal URL normally.

    However, I have no way so far to hide the URL from outside.

    Note that getDownloadUrl.php could change its way to manage the auto-update in the future. Since it’s an internal used URL, there’s no warranty to keep its retro-compatibility.

    So the conclusion that I draw: @mforrest and others may use it as-is if they want to take the risk (because he cannot stop them), but they need to understand that the rules used behind-the-scenes are allowed to change at any time, without notice.


    update: further, this post confirms that the behavior of missing version= changed at the same time as Don’s 2023-Sep-21 update to allow either version=X.Y.Z or version=X.YZ – since we know there was a change there, but the versions in the npp-specific wingup repo and in the gup4win repo haven’t changed in 8 years, we also can conclude that the one actually used by Notepad++ is custom, even compared to the notepad-plus-plus/wingup repo version.

  • HunSpell, remove words from .dic

    33
    -1 Votes
    33 Posts
    3k Views
    mkupperM

    Some topics are troll magnets. Are they seeking, HunSpell, .dic, or something deeper?

  • Looking for a quick way to add lines of text after | if possible

    7
    0 Votes
    7 Posts
    334 Views
    CheapSweetLifeC

    @Coises
    Okay freaking genius way of doing things I don’t even need to add the | at the end anymore since I don’t need to use the Bulk Renamer Utility. This makes things so much simpler. I want to tell you thing worked great for the last 10 movies I have bee working with but now the only big issue is renaming the trailers. Since there names are always all over the place.

    From things like:
    Criminal (2016 Movie) Official Trailer – “Remember”.mp4|
    Crimson Peak Official Trailer #1 (2015) - Tom Hiddleston, Jessica Chastain Movie HD.mp4|
    Darkman Official Trailer #1 - Liam Neeson Movie (1990) HD.mp4|
    Dreamer Inspired by a True Story Trailer (2005).mp4|
    From Time To Time - Trailer.mp4|
    GHOSTBUSTERS: FROZEN EMPIRE - Official Trailer (HD).mp4|

    so using that same code would be a bit harder since there is nothing that matches from file name to file name. but at least the movie files will be done in a freaking snap now. I really want to thank you for the help with that.

  • File sorting

    20
    0 Votes
    20 Posts
    5k Views
    Mark OlsonM

    @Mahmoud-Madkour
    To open a tree view for a file in REGEX mode, just use the Regex search to JSON command from the JsonTools plugin menu.
    Once the tree view is open, you can paste the query into the text box at the top right corner of the tree view, and click the Submit query button next to the text box.

  • Replacing single columns with hash (sha256) values

    3
    0 Votes
    3 Posts
    820 Views
    CoisesC

    @Chrissiju said in Replacing single columns with hash (sha256) values:

    Is it possible to jointly generate an SHA256 hash for each and every value in a single column, using Lint ? (i.e. not for the whole file one hash, but one hash per ‘excel box’). Purpose: For privacy reasons the original values are not to be presented , but a unique pseudonym is needed.

    It is possible that I don’t understand your problem. Please forgive me if I’ve missed the point. Can you do this?:

    First, make a rectangular selection enclosing the column. (Click at the top left of the column, then Alt+Shift+click at the bottom right of the column. If you have to scroll to get to the bottom, use the scrollbar, not keyboard navigation.)

    Now, copy to the clipboard.

    Next, select Tools | SHA-256 | Generate… from the main menu.

    Check Treat each line as a separate string and paste what you copied into the top box in the dialog.

    Click the Copy to Clipboard button.

    Now, open a new (empty) tab and paste the contents of the clipboard.

    Make a rectangular selection around that and copy. Switch back to the original document and paste.

    (Despite my advice elsewhere, in this case you can paste directly into the rectangular selection if you made it top to bottom. If you made it bottom to top, the lines will be reversed… so don’t do that…)

  • Old WhatsApp conversations with legacy encoded emojis - find and replace?

    9
    1 Votes
    9 Posts
    886 Views
    guy038G

    Hello, @peterjones, @alan-kilborn and All,

    From, your two last posts, Alan and Peter, I asked myself : which is the distribution of all my text files, regarding their encoding ?

    I considered, as a text file, all the files with the main following extensions, by importance level :

    txt, .py, html, htm, xml, ini, msg, csv, log as well as few other files with rare extension

    Now, using the iconv.exe utility to get all the NON-UTF8 files and, then, the xxd.exe software to omit the UFT-16 encoded files, I was able, little by little, to restrict my list to 360 files, about, for which I possibly could change the encoding from ANSI to UTF-8 !

    Of course, opening all the files, one at a time, in N++, changing their encoding and saving them seemed rather tedious. Thus, I used a simple python script to achieve this task easily :

    ''' NAME : Move_to_UTF8_encoding.py REMARK : The fonction 'npp_get_statusbar' is an idea of @alan-kilborn This script : - Opens a file which contains a list of ABSOLUTE file-paths - Read, successively, the file-paths from that list - Open EACH file in N++ - Perform the 'Convert to UTD-8' action on the CURRENT opened ANSI file - Save and close EACH file, one at a time NOTES : - The file, containing the list of ABSOLUTE file-paths to OPEN, is an UTF-8 encoded file, with 'Windows' EOL - This list must NOT contain EMPTY or BLANK lines - But, any line beginning with the '#' character is simply IGNORED ( So begin any EMPTY line or COMMENT line with a '#' char ! ) - The PATHS are designated by a SIMPLE character ANTI-SLASH ( Ex : D:\Dir_1\Dir_2\Name.txt ). NO need to DOUBLE the ANTISLASH ( \\ ) - On the same way, NO need to SURROUND the file-paths, containing SPACE characters, with DOUBLE-QUOTES - This list may contain some ACCENTUATED characters ''' from Npp import * import time import ctypes from ctypes.wintypes import BOOL, HWND, WPARAM, LPARAM, UINT console.show() console.clear() with open('D:\\Verif.txt') as file: for file_path in file: file_path = file_path.strip('\n') if file_path[0] == "#": continue notepad.open(file_path) # ---------------------------------------------------------------------------------------------------------------------------------------------------- # From @alan-kilborn, in post https://community.notepad-plus-plus.org/topic/21733/pythonscript-different-behavior-in-script-vs-in-immediate-mode/4 # ---------------------------------------------------------------------------------------------------------------------------------------------------- def npp_get_statusbar(statusbar_item_number): WNDENUMPROC = ctypes.WINFUNCTYPE(BOOL, HWND, LPARAM) FindWindowW = ctypes.windll.user32.FindWindowW FindWindowExW = ctypes.windll.user32.FindWindowExW SendMessageW = ctypes.windll.user32.SendMessageW LRESULT = LPARAM SendMessageW.restype = LRESULT SendMessageW.argtypes = [ HWND, UINT, WPARAM, LPARAM ] EnumChildWindows = ctypes.windll.user32.EnumChildWindows GetClassNameW = ctypes.windll.user32.GetClassNameW create_unicode_buffer = ctypes.create_unicode_buffer SBT_OWNERDRAW = 0x1000 WM_USER = 0x400; SB_GETTEXTLENGTHW = WM_USER + 12; SB_GETTEXTW = WM_USER + 13 npp_get_statusbar.STATUSBAR_HANDLE = None def get_result_from_statusbar(statusbar_item_number): assert statusbar_item_number <= 5 retcode = SendMessageW(npp_get_statusbar.STATUSBAR_HANDLE, SB_GETTEXTLENGTHW, statusbar_item_number, 0) length = retcode & 0xFFFF type = (retcode >> 16) & 0xFFFF assert (type != SBT_OWNERDRAW) text_buffer = create_unicode_buffer(length) retcode = SendMessageW(npp_get_statusbar.STATUSBAR_HANDLE, SB_GETTEXTW, statusbar_item_number, ctypes.addressof(text_buffer)) retval = '{}'.format(text_buffer[:length]) return retval def EnumCallback(hwnd, lparam): curr_class = create_unicode_buffer(256) GetClassNameW(hwnd, curr_class, 256) if curr_class.value.lower() == "msctls_statusbar32": npp_get_statusbar.STATUSBAR_HANDLE = hwnd return False # stop the enumeration return True # continue the enumeration npp_hwnd = FindWindowW(u"Notepad++", None) EnumChildWindows(npp_hwnd, WNDENUMPROC(EnumCallback), 0) if npp_get_statusbar.STATUSBAR_HANDLE: return get_result_from_statusbar(statusbar_item_number) assert False St_bar = npp_get_statusbar(4) # Zone 4 ( STATUSBARSECTION.UNICODETYPE ) if St_bar == 'ANSI': # => Conversion to 'UTF-8', without BOM, RECOMMENDED ! time.sleep(0.5) notepad.runMenuCommand("Encoding", "Convert to UTF-8") notepad.save() time.sleep(0.5) notepad.close()

    REMARK :

    As I was a bit anxious about the needed time to get the encoding change and the save action, for each file, I preferred to use timers to properly ensure the entire process but, may be, these timers are not necessary !

    So, after the various modifications, I got a list of 11,578 files whose distribution, according to their encoding, is as follows :

    UTF-8 BOM : 208 | UTF-16 LE BOM : 39 | UTF-16 BE BOM : 4 | UTF-8 : 540 ( 0 byte ) | => 10,737 with UNICODE encoding ( 92,7 % ) UTF-8 : 9,946 | ANSI : 841 ---------- TOTAL 11,578

    You certainly note that there still are a lot of ANSI files, but most of them are lang or configuration files for which the change of the encoding is rather forbidden or, at least, not welcome !

    Best Regards,

    guy038