Categories

  • Announcements regarding our community
    274 Topics
    5k Posts
    Murray Sobol 1M

    @mkupper
    Thanks, those 2 links provide reasonable “guess-timates” re: what to expect in the next release.
    Murray

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

    36 Topics
    60 Posts
    PeterJonesP
    Pork To Sausage

    The pork2Sausage.ini, accessible through Plugins > Pork to Sausage > Edit user commands, has a number of parameters for use in the the INI definitions, plus two special variables.

    Parameters:

    progPath: [Mandatory] The full path of the program to launch This is the full path, including the name of the .exe progCmd: [Mandatory] The whole command to call the program This is the whole command; because the program path is given in the first Parameter, this one can use just the name of the command rather than the full path workDir: [Mandatory] The path of working directory This is needed for setting the “working directory” for the program – for example, if it needs to be able to find specific libraries relative to some “current directory” progInput: [Optional] The full path name of the program input file. Pork to sausage plugin will write the selected text in a new created file with the given full path file name. This is helpful if you don’t want to try to input the “selected text” (see variables, below) on the command line (or example, if the selected text is too long, or the external program doesn’t accept text input on the command line) progOutput: [Optional] The full path name of the program output file. Pork to sausage plugin will replace selected text by the content of indicated file, which is supposed to be the output file of the program. If this parameter is absent, then Pork to sausage plugin will use the stdout of program to replace the selected text. This is useful if the external program writes its output to a file, instead of STDOUT. replaceSelection: [Optional] If its value is false, then the selected text will be untouched. Set this to false if you don’t want the active selection in Notepad++ to be overwritten.

    Variables

    $(SELECTION): Your text selection. The text will be encoded as UTF16-LE. Your external command must be able to handle the text in that encoding. $(TIMESTAMP): the Timestamp which will be generated by Pork to Sausage at the start of the call. This varible used for naming the file created by Pork to sausage plugin (progInput) to ensure the unicity (uniqueness) of the created file.

    Discussion

    There are two primary input methods to your application.

    You can send the selected text as an argument on the command line:progCmd=external.exe -inText "$(SELECTION)" ... You can have Pork to Sausage create a temporary file containing the selection:progInput=%TEMP%\Pork2Sausage.$(TIMESTAMP).input progCmd=external.exe -inputFile "%TEMP\Port2Sausage.$(TIMESTAMP).input"

    Example

    The default pork2sausage.ini gives a couple of examples of using just the command-line for the input text and the STDOUT of the command as the output text.

    But to give an example which requires the selected-text be sent to a temporary file (progInput) and the output of the command to another file (progOutput), here is a version of the same action as used by the NppExec example from earlier:

    [gpg-decrypt selection to self] progPath=c:\usr\local\apps\gnupg\bin\gpg.exe progCmd=gpg --output "C:\Users\XYZ\AppData\Local\Temp\p2s.$(TIMESTAMP).output" --decrypt "C:\Users\XYZ\AppData\Local\Temp\p2s.$(TIMESTAMP).asc" progInput=C:\Users\XYZ\AppData\Local\Temp\p2s.$(TIMESTAMP).asc progOutput=C:\Users\XYZ\AppData\Local\Temp\p2s.$(TIMESTAMP).output workDir=C:\Users\XYZ\AppData\Local\Temp

    The selected text will be written to the progInput file. Then progCmd will be run, which decrypts from the same file as progInput, and puts the result in the same file as progOutput. Then the plugin replaces the selected text with the contents of the progOutput file.

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

    4k Topics
    21k Posts
    Jim DaileyJ

    @PeterJones
    This thread reminds me of my old days at Dell when some newbie would reply all to a company-wide email with “please take me off this list” which would quickly be followed by 50 to 100 others! Mildly entertaining but not very productive.

    <mild_rant>
    I don’t understand why people get their knickers in a wad over whether some post is or is not sufficiently NPP-related. Sure, moderators need to check for spam, but regular users should stop pointing fingers and get about their business.
    </mild_rant>

  • 10k Topics
    52k Posts
    Mike AlbersM

    @Mike-Albers
    Addition for people that will use this final solution in an Oracle database:
    I had memo-fields in my export CSV-file that were restricted to 4000 CHAR positions. (default is max 4000 in bytes)
    The regex-search was:
    (?s)^(?:[^\r\n;];){N}.{0,3996}\r\n|^((?:[^\r\n;];){N}.{0,3996}).?\r\n|^(?:[^\r\n;]?)\r\n
    N normal fields + 1 memo-field that contains linefeeds in the text.

    In Oracle i created an external file based on the CSV-file with truncated memo field.
    It proofed impossible to read 4000 characters because the \r\n is taken into the fieldvalue.
    Once in Oracle the linefeeds are counted as single characters, but i think that is based on codeset-settings. When counting the length of the oracle CHAR(4000 CHAR) field i found a max length of 3970 instead of 3996 as my truncate position.
    Keep this in mind otherwise you will get problems with reject limits.

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

    1k Topics
    8k Posts
    PeterJonesP

    @Coises,

    How do you go about testing the ARM64 version? I’ve left that out of all my plugin work so far, because I haven’t a clue how to verify that it works at all.

    I don’t. I’m following the time-honored tradition of releasing software untested, and hoping that any users will find edge cases for me. :-)

    Given that it works as 32b and 64b on Intel processors, and I’m not doing anything that is out-of-the-ordinary, I am hoping that there aren’t any ARM64-specific bugs

  • 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
    462 Posts
    Alan KilbornA

    @PeterJones

    Ah…

  • Say fuck to Notepad++ here, and only here
    84 Topics
    498 Posts
    Dan AD

    @Terry-R I was referring to Notepad++, yes. I found an alternative, so it’s all good.

  • Blog posts from individual members
    56 Topics
    211 Posts
    barisusakliB

    Should be fixed now, thanks for reporting!

  • Computer/Programming Jokes are welcome here

    47 Topics
    143 Posts
    EkopalypseE

    31fe40b1-0906-49cb-a0d0-e775b805ed09-{0D57B733-9538-466F-ACC2-BE10F50B9147}.png