Community
    • Login

    NppExec v0.7.1 has been released!

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    4 Posts 3 Posters 499 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Vitaliy DovganV
      Vitaliy Dovgan
      last edited by

      This is a recommended update over NppExec v0.7 and over any previous version of NppExec.
      More about NppExec here:
      https://github.com/d0vgan/nppexec/

      What’s new in v0.7.1:

      • changed: now IF/IF~/ELSE IF use delayed $(var) substitution.
        It means that IF “$(var)” != “” will work even when the value of $(var)
        contains inner " quote character(s).
      • added: now npe_debuglog supports the keyword “local”.
      • fixed: when there was a “local” command followed by a similar “non-local”
        command, the “non-local” one behaved as if it was “local”.
      • changed: $(var) substitution has been reworked and improved.
      • added: set <var> ~ strexpand <s>

      Get this version here:
      https://github.com/d0vgan/nppexec/releases/tag/v071
      or here:
      https://sourceforge.net/projects/npp-plugins/files/NppExec/NppExec Plugin v0.7.1/

      1 Reply Last reply Reply Quote 5
      • EkopalypseE
        Ekopalypse
        last edited by Ekopalypse

        @Vitaliy-Dovgan
        Sorry to address you directly, but may I ask if you can take a look
        here to see if there is a reasonable way to do this with NppExec?
        Thanks a lot

        1 Reply Last reply Reply Quote 0
        • artie-finkelsteinA
          artie-finkelstein
          last edited by

          Can anyone shed insight into the “levels” of npp_console local? It’s working better than I could hope, but I’d like to make sure my findings are ‘normal’ and expected.

          I’m using the NppEventExec plugin to trigger a NppExec script. The basic script runs fine, it and any subordinate scripts all start with npp_console ? to keep/preserve the current console state. I discovered that any time ‘NppEventExec’ invoked the script it also forced the ‘NppExec’ console to be visible. I chocked that up to a side effect of message passing between plugins. (I did open an issue in the NppEventExec github.) The workaround was to create a two line wrapper script that starts with npp_console local off and the second line uses NPP_EXEC to call the original script. It works great, but this is also where it gets interesting…

          I modified the main (now second) script to add a feature and incorrectly called the strfind function. The odd thing was the console opened and displayed the output from the background echos in the code and the pertinent error messages for the incorrect strfind call. I like the behavior, but did not expect it. Was I just lucky, or is it that Vitaliy Dovgan is a genius?

          During the development, I also noticed that trying to use npp_console local off inside an if/then block had no effect (I included an audible output inside the same block to verify it was being entered). I expected that the local console off version would go into effect and shut the console off until the end of the script (instead it seems to have been ignored). Perhaps this was ineffective given the on triggered state from NppEventExec? (This was prior to using the two line wrapper solution.) I have to do more testing to better understand the ‘corner cases’ but if anyone can shed some light on this, I’d appreciate it, as it would speed things up.

          Thank you.

          Vitaliy DovganV 1 Reply Last reply Reply Quote 0
          • Vitaliy DovganV
            Vitaliy Dovgan @artie-finkelstein
            last edited by

            @artie-finkelstein
            By default, NppExec’s Console becomes visible when any script is executed. To avoid it, npp_console ? should be used. (See NppExec Manual, section “4.1. NppExec’s Console behaviour”).
            I tried to reproduce the situation with npp_console local off under an if block within NppExec’s temporary script (Plugins -> NppExec -> Execute NppExec Script), and everything worked as expected:

            set local a = 123
            if $(a) == 123 then
              npp_console local off // the Console becomes hidden
            endif
            strfind // produces an error "about to start a child process: "strfind""
            sleep 2000
            // the Console becomes visible
            
            1 Reply Last reply Reply Quote 1
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors