I am getting a script executed via NppExec,. In the console window the message "Process started >>>" appears but then nothing. There is no output from my script commands being shown.
Any advice?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
where pc is the compiler + parameters and c:\workarea\progwinx\prog2win.prj is the full path to a project (make) file.
At the time I issue (f6) the script containing this line I will be in the process of editing a .C file
So I want to compile a .PRJ file not the .C file I'm editing in NP++.
The examples show the use of "run@$(EXT_PART)" where (EXT_PART) would expect ".C". How would I express a script so that ".PRJ" was substituted for (EXT_PART) - or is ther another way of doing it?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There are a lot of ways to do it, just look at existing environment variables and decide which one to use. For example, if the name of your .prj file is always the same as the name of your current .c file, you can use "$(NAME_PART).prj" when specifying the file name.
You can pass the file name as a parameter, refer to NppExec_Manual: 4.3. Run-time parameters.
The approach you choose will depend on your current specific needs: the first thing is to understand what exactly you want to do and the second thing is to "tell" NppExec how it (NppExec) can do it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I don't have any of npes_temp.txt, npes_saved.txt or nppexec.ini in any of NPP 's sub-folders. Nothing in Plugins\Config. Nor do I have npec_cmdhistory.txt
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you still want to use NPP_RUN (i.e. to run pc.exe in its own console window), you can try the following:
env_set prjpath=c:\workarea\progwinx
cd $(SYS.PRJPATH)
npp_run pc /t/w/c $(SYS.PRJPATH)\prog2win.prj
Some old compilers have problems with files located in different directory than the current directory, therefore the CD command may help.
I have no other suggestions.
> Nothing in Plugins\Config
Type this in NppExec's Console:
dir $(PLUGINS_CONFIG_DIR)\npe*.txt
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am getting a script executed via NppExec,. In the console window the message "Process started >>>" appears but then nothing. There is no output from my script commands being shown.
Any advice?
> I have no other suggestions.
OK, thanks - I'll stick with cmd /c
> dir $(PLUGINS_CONFIG_DIR)\npe*.txt
Right, this took me to C:\Documents and Settings\Application Data\Notepad++\plugins and there they were. Thanks
refer to NppExec_Manual:
3.3. Do something (how-to)
4.4. Using cmd.exe
4.5. Console output redirection
DV: thanks. I've managed to get my process ( a compilation) to work. I am using a .PRJ (make) file and at the moment my 'command line' shows :
cmd /c c:\pc /t/w/c c:\workarea\progwinx\prog2win.prj
where pc is the compiler + parameters and c:\workarea\progwinx\prog2win.prj is the full path to a project (make) file.
At the time I issue (f6) the script containing this line I will be in the process of editing a .C file
So I want to compile a .PRJ file not the .C file I'm editing in NP++.
The examples show the use of "run@$(EXT_PART)" where (EXT_PART) would expect ".C". How would I express a script so that ".PRJ" was substituted for (EXT_PART) - or is ther another way of doing it?
There are a lot of ways to do it, just look at existing environment variables and decide which one to use. For example, if the name of your .prj file is always the same as the name of your current .c file, you can use "$(NAME_PART).prj" when specifying the file name.
You can pass the file name as a parameter, refer to NppExec_Manual: 4.3. Run-time parameters.
The approach you choose will depend on your current specific needs: the first thing is to understand what exactly you want to do and the second thing is to "tell" NppExec how it (NppExec) can do it.
My original command line was:
cmd /c pc /t/w/c c:\workarea\progwinx\prog2win.prj
I now do:
env_set prjpath=c:\workarea\progwinx
cmd /c pc /t/w/c $(SYS.PRJPATH)\prog2win.prj
and this works fine.
If I replace cmd /c with npp_run, thus:
env_set prjpath=c:\workarea\progwinx
npp_run pc /t/w/c $(SYS.PRJPATH)\prog2win.prj
a console window opens, the compiler loads but gives me an error message "cannot find file 'c:\workarea\progwinx\prog2win.prj'"
Any idea why this happens?
Also, if I save a script, where is it kept?
Thanks
> cannot find file 'c:\workarea\progwinx\prog2win.prj'
Seems to be the compiler's problem. Maybe it expects the file path in double quotes i.e.
pc /t/w/c "$(SYS.PRJPATH)\prog2win.prj"
> Also, if I save a script, where is it kept?
(Notepad++'es main menu) Plugins -> NppExec -> Help/About...
> Maybe it expects the file path in double quotes
No, this doesn't work
> Plugins -> NppExec -> Help/About.
I don't have any of npes_temp.txt, npes_saved.txt or nppexec.ini in any of NPP 's sub-folders. Nothing in Plugins\Config. Nor do I have npec_cmdhistory.txt
If you still want to use NPP_RUN (i.e. to run pc.exe in its own console window), you can try the following:
env_set prjpath=c:\workarea\progwinx
cd $(SYS.PRJPATH)
npp_run pc /t/w/c $(SYS.PRJPATH)\prog2win.prj
Some old compilers have problems with files located in different directory than the current directory, therefore the CD command may help.
I have no other suggestions.
> Nothing in Plugins\Config
Type this in NppExec's Console:
dir $(PLUGINS_CONFIG_DIR)\npe*.txt