NppExec v0.7.1 has been released!
-
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/ - changed: now IF/IF~/ELSE IF use delayed $(var) substitution.
-
@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 -
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 aNppExec
script. The basic script runs fine, it and any subordinate scripts all start withnpp_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 withnpp_console local off
and the second line usesNPP_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 incorrectstrfind
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 fromNppEventExec
? (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.
-
@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 withnpp_console local off
under anif
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