You can configure the NPPExec plugin in Notepad++ to have a startup script. I use this to set certain environment values that I don't normally use to make script execution easier. The problem is that I can't run that startup script more than once, or it will damage the environment.
However, when Notepad++ starts up with a startup script, that script also becomes the current script. So if you try to run the current script, you run the startup script again.
Is there some kind of condition or something that I can put in the script that will allow it to only run once? Like the last line of the script sets an environment variable, and the first line aborts if the variable is set?
It's really annoying to have to restart a fresh copy of Notepad++ just because I forgot to set the current script and pressed F5.