Community
    • Login

    NppExec - latest development version

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    27 Posts 6 Posters 3.0k 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.
    • artie-finkelsteinA
      artie-finkelstein @artie-finkelstein
      last edited by

      @Vitaliy-Dovgan
      The parsing of other files of manifest constant works great! I messed up my testing the other day.

      In my further testing today, I was pleased to find that the names parsed by fparser for ‘~’ commands are independent of user created names.

      set pi = 3
      set e = 2
      set local locDiff ~ pi - e
      echo locDiff=$(locDiff)
      echo pi=$(pi)
      echo e=$(e)
      

      displays

      locDiff=0.423311
      pi=3
      e=2
      
      1 Reply Last reply Reply Quote 0
      • dinkumoilD
        dinkumoil @Vitaliy Dovgan
        last edited by

        @Vitaliy-Dovgan

        I found a bug in the latest version of NppExec from NppExec20210724_dll_PA.zip

        In one of my scripts there is the line

        if "$(CLIPBOARD_TEXT)" != "" goto :SHOW_RESULT
        

        If the clipboard contains text which contains a " sign (for example This is a "testing" text), I get an error message:

        ; executing: IF "This is a "testing" text
        " != "" goto :SHOW_RESULT
        - Syntax error in the if-condition.
        To prevent unpredictable behavior, the script is stopped.
        

        Previous versions of NppExec were able to process this line without any error.

        Vitaliy DovganV 1 Reply Last reply Reply Quote 0
        • Vitaliy DovganV
          Vitaliy Dovgan @dinkumoil
          last edited by

          What about

          if `$(CLIPBOARD_TEXT)` != `` goto :SHOW_RESULT
          

          ?
          In fact, the previous version of NppExec has other problems parsing the IF arguments, so that part of code was rewritten to be more strict in terms of syntax. So now extra " within another pair of "" leads to syntax error.

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

            Here is an alternative approach:

            set local len ~ strlen $(CLIPBOARD_TEXT)
            if $(len) != 0 goto :SHOW_RESULT
            
            dinkumoilD 1 Reply Last reply Reply Quote 1
            • dinkumoilD
              dinkumoil @Vitaliy Dovgan
              last edited by dinkumoil

              @Vitaliy-Dovgan

              Another workaround:

              if "" != "$(CLIPBOARD_TEXT)" goto :SHOW_RESULT
              
              1 Reply Last reply Reply Quote 0
              • Vitalii DovganV
                Vitalii Dovgan
                last edited by

                Guys, there is a release candidate for an upcoming new version of NppExec.
                You can find the latest binaries here:
                https://sourceforge.net/projects/npp-plugins/files/NppExec/NppExec Plugin (dev)/

                I know that everyone is waiting for ads in NppExec’s Console, but I have to disappoint you: no ads in NppExec, even though human kind seems to be obsessed by ads (as ads appear every-freaking-where).
                Also I have to disappoint you regarding multi-line pasting into NppExec’s Console: I am still not sure how exactly to implement this. Instead, there is a new feature that can be used instead of multi-line pasting (though I understand it can not completely replace a native ability of multi-line pasting).

                So, here are the most interesting new features:

                1. Added a built-in highlight filter that catches most of compiler error messages. This filter is disabled by default to avoid an impact on performance. It is recommanded to enable this filter locally, right before running a compiler or an interpreter: “npe_console local – x+”.
                2. Added new menu items “Execute Selected Text”, “Execute Clipboard Text”. So now you can select a text in Notepad++ and “Execute Selected Text” will execute it as NppExec’s script or send it to the running child process as an input. Also, a new command “npp_exectext” added.

                Here is the list of all the changes:

                • added: built-in highlight filter that catches most of compiler error
                  messages, thanks to David Maisonave.
                  This filter is disabled by default to avoid an impact on performance.
                  It is recommanded to enable this filter locally, right before running
                  a compiler or an interpreter: “npe_console local – x+”.
                  See also: “NppExec_TechInfo.txt”, the ‘CompilerErrors’ setting.
                • added: now WarningAnalyzer caches the previously matched lines.
                  It allows the built-in highlight filter (see above) to react to a
                  double-click in the Console even when this filter is disabled at the
                  moment of double-clicking. Explanation: let’s consider a situation when
                  the built-in highlight filter had been disabled globally but was locally
                  enabled via “npe_console local – x+” right before running a compiler. So
                  the messages produced by compiler are analyzed by the built-in highlight
                  filter and the filter is automatically disabled after the compiler exits.
                  Now, as WarningAnalyzer has cached the matched lines from the compiler’s
                  output, it is possible to double-click these lines in NppExec’s Console
                  to get the cached match result.
                • added: the last executed script is now saved to “npes_last.txt”.
                • added: new menu items “Execute Selected Text”, “Execute Clipboard Text”.
                • NPE_CONSOLE c<N> and s<N> to change the text processing for the
                  Execute Clipboard Text and Execute Selected Text.
                • added: new command “proc_input”.
                • added: new command “npp_exectext”.
                • added: new variables $(SELECTED_TEXT), $(IS_PROCESS).
                • changed: the menu item “Disable command aliases” has been removed. Use
                  the “npe_console q+/q-” instead.
                • changed: now killing a running child process also kills any processes
                  that were started from the running child process.
                • changed: now “help” command works in NppExec’s scripts.
                • fixed: now “set local” (without an argument) prints only local vars.
                • NppExec Manual updated
                Michael VincentM 2 Replies Last reply Reply Quote 5
                • Michael VincentM
                  Michael Vincent @Vitalii Dovgan
                  last edited by

                  @vitalii-dovgan said in NppExec - latest development version:

                  Guys, there is a release candidate for an upcoming new version of NppExec.
                  You can find the latest binaries here:

                  Just installed it. FYI, I’ve been using your AppVeyor build for a bit now before this.

                  I did notice a caveat in installing - a new menu item or two in the NppExec menu caused a shift in all of my Macro menu items shortcuts that are NppExec scripts so I had to go manually remap all the shortcuts. This is a known issue with Notepad++ menu ID numbers - nothing you can “fix”, just something for others to be aware of.

                  Great job on continued development of the NppExec plugin - one of my MUST HAVE plugins I use in every Notepad++ editing session!

                  Cheers.

                  1 Reply Last reply Reply Quote 3
                  • Michael VincentM
                    Michael Vincent @Vitalii Dovgan
                    last edited by

                    @vitalii-dovgan said in NppExec - latest development version:

                    Guys, there is a release candidate for an upcoming new version of NppExec.

                    Found what seems to be a regression.

                    I have a global set:

                    SET CMD=cmd.exe /d /c
                    

                    And I use it in scripts - for example:

                    $(CMD) start $(NPP_DIRECTORY)\change.log
                    

                    and this launches Notepad.exe (my default .log editor apparently) with change.log.

                    In the new version, nothing happens. It seems the $(CMD) variable isn’t launching an external CMD.exe process? Weird, because other things like:

                    $(CMD) dir /b /ad $(NPP_DIRECTORY)
                    

                    do work.

                    Cheers.

                    Vitalii DovganV 1 Reply Last reply Reply Quote 1
                    • Vitalii DovganV
                      Vitalii Dovgan @Michael Vincent
                      last edited by

                      Please try the latest version NppExec20220203_dll here:
                      https://sourceforge.net/projects/npp-plugins/files/NppExec/NppExec Plugin (dev)/

                      Changelog:

                      • NPE_CONSOLE j+/j- to kill process tree on/off.
                      • npp_files updated to Notepad++ 8.2.2.
                      • tiny internal improvements
                      Michael VincentM 1 Reply Last reply Reply Quote 1
                      • Michael VincentM
                        Michael Vincent @Vitalii Dovgan
                        last edited by

                        @vitalii-dovgan

                        Thanks! And thanks for the help on your Github issues page - my scripts are updated and this latest 3-Feb version is working fine for me so far!

                        Cheers.

                        1 Reply Last reply Reply Quote 0
                        • Vitalii DovganV
                          Vitalii Dovgan
                          last edited by

                          Continuing to polish the plugin before the release :)
                          Latest dev version NppExec20220215 includes small improvements, such as:

                          • new flag 64 for “npe_console c<N>”, “npe_console s<N>” and “npp_exectext”
                          • fixed: “npe_console k3” did not work with Alt+key
                          • (internal) CNppExecCommandExecutor::ExecuteChildProcessCommand supports multi-line input

                          https://sourceforge.net/projects/npp-plugins/files/NppExec/NppExec Plugin (dev)/

                          1 Reply Last reply Reply Quote 3
                          • First post
                            Last post
                          The Community of users of the Notepad++ text editor.
                          Powered by NodeBB | Contributors