• Using plug-ins in macro

    6
    0 Votes
    6 Posts
    1k Views
    PeterJonesP

    @garry-weil ,

    my plug-in has a subcommand. Is there a way to specify that via a xParam ?

    I am not sure what you mean by “subcommand”. In Windows menus, there are either separator lines, submenus, or command entries. Command IDs are only available for command entries, nothing else has a command ID.

    For example, as NppUISpy shows in my current Notepad++ environment:

    fc4147e2-4fd6-471b-a374-b0bbd1609728-image.png

    Plugins > Python Script is a submenu, so it has a command ID of “0”. Then it has some actions which are 22108-22111. Then it has a Scripts submenu with id=0. Then there is the startup script command entry inside that menu, with id=23034, another couple of submenus, then a script that is called aaa123 with id=23127. So if I wanted to run the aaa123 script from a macro, I could create a macro that calls that number, such as

    <Macro name="Example" Ctrl="no" Alt="no" Shift="no" Key="0"> <Action type="2" message="0" wParam="23127" lParam="0" sParam="" /> </Macro>

    There is also a keyboard shortcut for the subcommand. Is there a way to execute that in the macro?

    If that keyboard shortcut is editable using the Notepad++ built-in shortcut mapper, then the chances are, it will be able to run that using the number that UI Spy shows you. But plugins can also define keyboard shortcuts not using the Shortcut Mapper (though that’s an evil practice, since it makes for unknown shortcut conflicts) – so having a shortcut is not a guarantee that the plugin is playing nice.

    (note: didn’t see your “nevermind” until after I had the whole post basically written, so I am including it for future readers, and you if you care to have the extra info)

  • How to extract part of the text

    2
    0 Votes
    2 Posts
    966 Views
  • ctrl-tab with cloned docs is borked.

    7
    0 Votes
    7 Posts
    402 Views
    GubithG

    @alan-kilborn Thanks. Still driving me nuts every time I CtrlTab!

  • Try using sessions (again)

    4
    0 Votes
    4 Posts
    708 Views
    GubithG

    I was able to get this working…

    Sesion-Manager-Settings.jpg

    Sesion-Manager-Sessions.jpg

    Sesion-Manager-Multi-Instance.jpg

    Sesion-Manager-Backup.jpg

  • Finding numbers and batch perform arithmetics in text?

    3
    0 Votes
    3 Posts
    319 Views
    Ciprian PopaC

    @alan-kilborn Hi Alan,
    Thank you for that piece of code!

  • New Bug in 8.1.9.2

    3
    0 Votes
    3 Posts
    327 Views
    PeterJonesP

    @alexander-groh ,

    Deleting a topic after it’s been answered is considered rude. The topic has been restored by a moderator.

  • Default for C++ language

    6
    0 Votes
    6 Posts
    1k Views
    PeterJonesP

    @trevor-w said in Default for C++ language:

    that worked.

    Glad it worked for you.

    this should be the solution to @queenidog1 problem too.

    Doubtful. As explicitly stated, the original post was about pasting text into a new document (that is, what you get when you open Notepad++ with no previous session open, or what you get from a File>New), whereas your question was how to treat an already-existing file that you open with File>Open or equivalent. Those are two separate things, and the answer I gave to each is the right way of handling those two separate situations.

  • Abnormal scroll at end of the file

    3
    0 Votes
    3 Posts
    333 Views
    L

    @terry-r Yes! I solved. Thank you

  • Word Wrap should be a local setting for each tab

    3
    1 Votes
    3 Posts
    304 Views
    Alan KilbornA

    @Steve-James

    If you are willing to “script” it, you can find a workaround to the native deficiency HERE.

  • Count Blank Rows

    4
    0 Votes
    4 Posts
    2k Views
    Alan KilbornA

    @alan-kilborn said in Count Blank Rows:

    Maybe change your regular expression to ^\s*\R ?

    Yea…my advice was bad. :-(
    It will count several blank lines in a row as one.
    Go with the Peter solution.

  • Remove extra NP++ description from "Open with..." menu!

    8
    0 Votes
    8 Posts
    810 Views
    JamesWebbJ

    @ludamo-0 said in Remove extra NP++ description from "Open with..." menu!:

    @ten2120 Well again the details are a little hazy but there are a number of programs which have this value. The simplest would be wordpad.exe seeing it is built in to windows, or wmplayer.exe. Also common programs like vlc and irfanview have it (originally I think). I may have used procmon from SysInternals to see what keys are referenced when R-clicking in explorer.

    Thanks. Big help, I would check it out (SysInternals). 👍

  • Find and Replace in Column Selection Mode

    4
    0 Votes
    4 Posts
    489 Views
    Alan KilbornA

    @alan-kilborn said in Find and Replace in Column Selection Mode:

    I will be posting a Pythonscript with this capability “soon”.
    Watch for it.

    This was finally done HERE.

  • Opened files tab vertical, but with horizontal buttons

    5
    0 Votes
    5 Posts
    1k Views
    guy038G

    Hello, @grzegorz-szyszło, @peterjones, @alan-kilborn and All,

    OMG ! I must had been very tired, yesterday, when I posted ! Of course, you’re right ! Thanks, Alan.

    BR

    guy038

    P.S. :

    So I suppose that this option, below, is quite useless !!

    8b3f3fff-5944-454f-bc9d-11ff25f9adc2-image.png

  • Language definition file has no effect... why?

    2
    0 Votes
    2 Posts
    586 Views
    PeterJonesP

    @jonathan-sachs ,

    User Defined Languages do not show up in the alphabetized Language > R or similar… they show up at the bottom of the Language menu, below the Language > User Defined Language > … submenu (for your v8.1.3; or, if you are in as old of a Notepad++ as Steen-Hultin’s UDL screenshots show, below the Language > Define Your Language…).

    e3d44579-0ec0-439b-996e-a50408847df3-image.png
    … in my screenshot, ABC, Markdown (preinstalled), Markdown (preinstalled dark mode), and TI-Basic are all UDL that I can select.

    The file UserDefineLangs.xml contains an entry for this UDL.

    If that’s true, then Language > reStructuredText should show up near the Markdown entry, and Language > Define Your Language (or in a modern Notepad++, Language > User Defined Language > Define Your Language) should have reStructuredText in the User Language pulldown – see that mine shows the same languages in that pulldown that were in my menu screenshot:
    fe9a377a-d24f-43a1-989f-e69c334017b4-image.png

    If you cannot figure it out from this, you might want to give us a screenshot of one or both of those locations to aid in debugging, along with going to the ?-menu Debug Info entry, clicking on the Copy debug info into clipboard hyperlink, and paste that into your reply as well.

  • Remove Repeated Words and Symbols

    2
    0 Votes
    2 Posts
    1k Views
    guy038G

    Hello, @kloruklass and All,

    Given your ( uniq ! ) example :

    dmg_sm0993_event (summonedtable) 0039-event [damage=hit_defend_fail_se_0039_type=slash_low] [damage_fail_type=defend_fail] {!} {r} {m} {s} {e}

    With the following regex S/R :

    SEARCH (?-s)[^\w{}\r\n]+(?:\x20*({.+?})|)

    REPLACE ?1:_

    Tick the Wrap around option

    Select the Regular expression search mode

    Click once, on the Replace All button

    You’ll get this temporary text :

    dmg_sm0993_event_summonedtable_0039_event_damage_hit_defend_fail_se_0039_type_slash_low_damage_fail_type_defend_fail

    Now, using this second regex S/R :

    SEARCH (?i-s)(([a-z0-9]+)_.*)_\2(?:(_)|\R|\z)

    REPLACE \1?3_

    Click on the Replace All button, several times, till you see the status line 0 occurrences were replaced in entire file ( IMPORTANT )

    And you’ll get the expected text :

    dmg_sm0993_event_summonedtable_0039_damage_hit_defend_fail_se_type_slash_low

    Best Regards

    guy038

  • [Meta] Forum Tweaks

    12
    1 Votes
    12 Posts
    882 Views
    guy038G

    Hello, @artie-finkelstein and All,

    Yes, your different points of view are quite sensible ! It’s just that I still used to think about a laptop as a limited storage device ( My old Win XP machine had two partitions : C: of 10 Gb and D: of 30 Gb, only ! ). So, let me a couple of weeks to fully realize that my new Win 10 laptop has 415 Gb of free space !!

    I first considered to recopy all my 30 Gb pack of photos ( already saved on two different external HDD and on a 64 Gb USB key ) on the SSD disk of my HP machine. But, you’re right ! This operation is useless : I just have to keep the USB key and the tiny 2 Tb HDD, recently purchased, in my laptop bag, for any further photo session !

    Cheers

    guy038

  • Subtractive searching.

    3
    0 Votes
    3 Posts
    412 Views
    Steve HajduS

    @peterjones

    This is great, thank you very much

  • [tip] F7 toggle search panel

    1
    1 Votes
    1 Posts
    351 Views
    No one has replied
  • Is anyone else interested in an Acrolinx plugin?

    1
    1 Votes
    1 Posts
    210 Views
    No one has replied
  • High Processor Usage

    5
    0 Votes
    5 Posts
    837 Views
    pnedevP

    @Guilherme-Gueringh ,

    Do you have your periodic session backup turned on?
    If yes, could you please try disabling it and see if the CPU usage is still high?
    Can you also check the CPU usage when you disable your network connectivity (all of it - Ethernet cable and WiFi)?