Menu

#343 nppexec truncates command argument

Not relevant
open
nobody
None
7
2019-05-22
2018-12-27
rhobison
No

I have a small program used to decode some proprietary protocols. I've created a command to execute the program passing the current selected word as a parameter. This works fine for short parameters (selected words), but it fails for long parameters because nppexec truncates the selected word before passing to the application.
I know Notepad++ has a lot of useful features, but because of this issue, I have to use Textpad instead of Notepad++. I would like to definitely replace Textpad with Notepad++.
Please, check the attached images.

Notepad++ v7.5.1 (64bit)
NppExec v0.6 alpha 1 Unicode

2 Attachments

Discussion

  • DV

    DV - 2019-05-22
    // NppExec 0.6 RC3
    npe_sendmsgbuflen 8M  // set the string buffer size to 8 MB or whatever is needed
    sci_sendmsg SCI_GETSELTEXT 0 @"" // get the selected text into $(MSG_LPARAM)
    your_tool.exe "$(MSG_LPARAM)" // passing the selected text to your tool
    
     
  • rhobison

    rhobison - 2019-05-22

    Hi!
    Thank you for the effort!
    I just downloaded the NppExec 0.6 RC3 and the problem persist.
    Only 2047 bytes of the argument is passed to NppExec.
    Do I need to update Npp also?

     
  • rhobison

    rhobison - 2019-05-22

    Sorry! I misunderstood your message!
    Now I'm using the following commands and everthing is working fine!

    cd D:\Rhobison\Programas\ATGenericPacketDebug\
    npe_sendmsgbuflen 8M // set the string buffer size to 8 MB or whatever is needed
    sci_sendmsg SCI_GETSELTEXT 0 @"" // get the selected text into $(MSG_LPARAM)
    D:\Rhobison\Programas\ATGenericPacketDebug\ATGenericPacketDebug.exe AAP "$(MSG_LPARAM)" $NPINFO$

    Thank you very much!

     

Log in to post a comment.

MongoDB Logo MongoDB