thanks for the comment in Explorer thread. You are also ;).
So my request for next version of NppExec:
What I really miss is to start NppExec scripts from other plugins like Explorer. I have often to start some scripts with the same context but different folders settings. What I mean is, I have a release script for my different plugins. It is in the root of my project folder. I can start it like following:
Explorer can be replaced with any other folder. And this is what I do to want:
Right click on the folder in Explorer. Now there are some NppExec scripts attached to the context. Hiting one of them starts a script. But here is the difference. This script of NppExec would be send to the calling plugin like Explorer. The Explorer parses it and replaces only supported NppExec values, like $(FULL_CURRENT_PATH) or maybe new ones like $(PLUGIN_FULL_CURRENT_PATH) and sent the modified script back to the NppExec. Finally it will be executed by NppExec.
What do you think about it.
Best Regards
Jens
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK, you win :)
I'll implement the simpliest possible solution: no multiple consoles for each task, just one console which will execute some external task when it is not busy by some internal task.
Talking about your suggestion about the realization - in fact, NppExec already contains all needed things for this. You don't even need any internal NppExec's script to do what you want because the command NPP_EXEC can execute external text file as a script, and parameters can be passed.
There are many thing to explain, we better discuss it in personal e-mails, or in ICQ, or in Skype. So here is just an example how I see the plugins "dialog".
(1) In the Explorer plugin, you create and store some predefined NppExec's scripts in Explorer's config folder. These scripts are simple plain text files (ANSI) which contain NppExec's commands.
For example, you want to 'cd' to some directory and then open all '*.txt' files in that directory. You create a text file which contains the following text:
// cd to directory specified by Explorer plugin
cd $(ARGV[1])
// open files specified by Explorer plugin's filter
npp_open $(ARGV[2])
Save this file as "cd_open.npes" or however you want. (npes means NPpExecScript). Save this file in a folder which is known for the Explorer plugin.
(2) In the Explorer plugin, you create menu items (or whatever you want to implement it) in order to call to NppExec. Now you must understand, can you enable or disable these menu items when user wants to use them. A message NPEM_GETSTATE must be sent to NppExec plugin. If it returns NPE_STATEREADY, you can enable the menu items corresponding to NppExec's commands; otherwise you disable them.
(3) Here is what you need to execute your "cd_open.npes": send a message NPEM_NPPEXEC to NppExec plugin.
The first parameter is an usual parameter of the NPP_EXEC command - i.e. a name of existing script or a name of a file which contains a script. I.e. the first parameter is a full path to "cd_open.npes".
The second parameter contains arguments for the NPP_EXEC command - EACH ARGUMENT MUST BE GIVEN INSIDE "" - i.e. two arguments in our example: the first argument is a path to 'cd' to, and the second argument is a file filter to use. Thus, the second argument, if Explorer's current folder is "C:\Program Files\Some Folder" and the file filter is "*.txt", will be the following: "\"C:\\Program Files\\Some Folder\" \"*.txt\"".
Thus, when NppExec will execute "cd_open.npes", it understand $(ARGV[1]) as "C:\\Program Files\\Some Folder" and $(ARGV[2]) as "*.txt".
Well, we better discuss it in details later, as I proposed.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I like your suggestion. Implement it and I will update my CVS folder of NppExec to get the correct header file. Please keep in mind that it should be possible to send arguments with quotations marks like:
"C:\\" "C:\\Program Files\\"
This example shows 2 arguments - just only if SF removes some chars...
BTW: You should use my combo box classes of HexEditor to select the consoles colors. It's easier to change them by this implementation than to add some hex values.
Best Regards and Thanks
Jens
PS: My other request was something like a Output Window for dynamic traces or other stuff and I still developed it for me.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just one annoying issue :
If NppExec v.0.2.4 is included with v5.0.1, on each Notepad++ launch time will the console docking box be displayed even it was hidden in the previous session.
Is it a bug or intended behaviour (for me it's rather a bug) ?
Don
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Don,
did you read the text which appears in the Console window? ;-) The text says:
(...)
- You can disable this Help Info in NppExec's Advanced Options.
I.e. Plugins -> NppExec -> Advanced Options... -> ShowHelp (on start) = No.
However, this information is shown specially, hoping that users will read it and this information helps to forestall some of their questions.
Moreover, starting from NppExec ver.0.2.5 (next version, currently in development), this option will be activated each time when version of NppExec is changed. I.e. if you disable it in NppExec ver.0.2.4, it will be activated in ver.0.2.5; if you disable it in ver.0.2.5, it will be activated in ver.0.2.6 (or ver.0.3.0) and so on.
Also, there is another option which can be set in the Advanced Options:
Visible (on start) = No/Yes
The default value is No, but maybe you have set it to Yes.
!!!IMPORTANT!!!
If you want to include NppExec ver.0.2.4 in Notepad++, please apply this simple patch before you include it:
It's just two lines in the source file "NppExec.cpp", but it is important.
Or you can wait for NppExec ver.0.2.5, but it will be released in the end of this month or in the beginning of the next month.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
However, the plugin will be included only if it doesn't change Notepad++ default behaviour.
For the release 5.0.1, NppExec v0.2 RC will be included.
If this behaviour is changed in the future NppExec version, then it'll be included in the Notepad++ future release.
Don
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK, I'll remove it.
But after it I'll just ignore repeating questions similar to "How can I run a compiler in NppExec Console" or "Why NPP_EXEC does not run my .exe file"?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
http://sourceforge.net/forum/forum.php?forum_id=672146
For your information:
Assigning shortcut keys to NppExec's menu items; a problem with script names which contain spaces (with solution)
(direct link to forum)
http://sourceforge.net/forum/forum.php?thread_id=2084596&forum_id=672146
A problem with script names which contain spaces (with solution)
(direct link to message)
http://sourceforge.net/forum/message.php?msg_id=5081090
Hello DV,
thanks for the comment in Explorer thread. You are also ;).
So my request for next version of NppExec:
What I really miss is to start NppExec scripts from other plugins like Explorer. I have often to start some scripts with the same context but different folders settings. What I mean is, I have a release script for my different plugins. It is in the root of my project folder. I can start it like following:
perl script.pl ./explorer ./explorer/change.log ./temp
Explorer can be replaced with any other folder. And this is what I do to want:
Right click on the folder in Explorer. Now there are some NppExec scripts attached to the context. Hiting one of them starts a script. But here is the difference. This script of NppExec would be send to the calling plugin like Explorer. The Explorer parses it and replaces only supported NppExec values, like $(FULL_CURRENT_PATH) or maybe new ones like $(PLUGIN_FULL_CURRENT_PATH) and sent the modified script back to the NppExec. Finally it will be executed by NppExec.
What do you think about it.
Best Regards
Jens
OK, you win :)
I'll implement the simpliest possible solution: no multiple consoles for each task, just one console which will execute some external task when it is not busy by some internal task.
Talking about your suggestion about the realization - in fact, NppExec already contains all needed things for this. You don't even need any internal NppExec's script to do what you want because the command NPP_EXEC can execute external text file as a script, and parameters can be passed.
There are many thing to explain, we better discuss it in personal e-mails, or in ICQ, or in Skype. So here is just an example how I see the plugins "dialog".
(1) In the Explorer plugin, you create and store some predefined NppExec's scripts in Explorer's config folder. These scripts are simple plain text files (ANSI) which contain NppExec's commands.
For example, you want to 'cd' to some directory and then open all '*.txt' files in that directory. You create a text file which contains the following text:
// cd to directory specified by Explorer plugin
cd $(ARGV[1])
// open files specified by Explorer plugin's filter
npp_open $(ARGV[2])
Save this file as "cd_open.npes" or however you want. (npes means NPpExecScript). Save this file in a folder which is known for the Explorer plugin.
(2) In the Explorer plugin, you create menu items (or whatever you want to implement it) in order to call to NppExec. Now you must understand, can you enable or disable these menu items when user wants to use them. A message NPEM_GETSTATE must be sent to NppExec plugin. If it returns NPE_STATEREADY, you can enable the menu items corresponding to NppExec's commands; otherwise you disable them.
(3) Here is what you need to execute your "cd_open.npes": send a message NPEM_NPPEXEC to NppExec plugin.
The first parameter is an usual parameter of the NPP_EXEC command - i.e. a name of existing script or a name of a file which contains a script. I.e. the first parameter is a full path to "cd_open.npes".
The second parameter contains arguments for the NPP_EXEC command - EACH ARGUMENT MUST BE GIVEN INSIDE "" - i.e. two arguments in our example: the first argument is a path to 'cd' to, and the second argument is a file filter to use. Thus, the second argument, if Explorer's current folder is "C:\Program Files\Some Folder" and the file filter is "*.txt", will be the following: "\"C:\\Program Files\\Some Folder\" \"*.txt\"".
Thus, when NppExec will execute "cd_open.npes", it understand $(ARGV[1]) as "C:\\Program Files\\Some Folder" and $(ARGV[2]) as "*.txt".
Well, we better discuss it in details later, as I proposed.
I like your suggestion. Implement it and I will update my CVS folder of NppExec to get the correct header file. Please keep in mind that it should be possible to send arguments with quotations marks like:
"C:\\" "C:\\Program Files\\"
This example shows 2 arguments - just only if SF removes some chars...
BTW: You should use my combo box classes of HexEditor to select the consoles colors. It's easier to change them by this implementation than to add some hex values.
Best Regards and Thanks
Jens
PS: My other request was something like a Output Window for dynamic traces or other stuff and I still developed it for me.
Vitaliy,
Great work.
Just one annoying issue :
If NppExec v.0.2.4 is included with v5.0.1, on each Notepad++ launch time will the console docking box be displayed even it was hidden in the previous session.
Is it a bug or intended behaviour (for me it's rather a bug) ?
Don
Don,
did you read the text which appears in the Console window? ;-) The text says:
(...)
- You can disable this Help Info in NppExec's Advanced Options.
I.e. Plugins -> NppExec -> Advanced Options... -> ShowHelp (on start) = No.
However, this information is shown specially, hoping that users will read it and this information helps to forestall some of their questions.
Moreover, starting from NppExec ver.0.2.5 (next version, currently in development), this option will be activated each time when version of NppExec is changed. I.e. if you disable it in NppExec ver.0.2.4, it will be activated in ver.0.2.5; if you disable it in ver.0.2.5, it will be activated in ver.0.2.6 (or ver.0.3.0) and so on.
Also, there is another option which can be set in the Advanced Options:
Visible (on start) = No/Yes
The default value is No, but maybe you have set it to Yes.
!!!IMPORTANT!!!
If you want to include NppExec ver.0.2.4 in Notepad++, please apply this simple patch before you include it:
A problem with script names which contain spaces (with solution)
(direct link to message)
http://sourceforge.net/forum/message.php?msg_id=5081090
It's just two lines in the source file "NppExec.cpp", but it is important.
Or you can wait for NppExec ver.0.2.5, but it will be released in the end of this month or in the beginning of the next month.
This is not a plugin then, it's an annoyance.
Ok, so it's intentional behaviour, but not a bug.
However, the plugin will be included only if it doesn't change Notepad++ default behaviour.
For the release 5.0.1, NppExec v0.2 RC will be included.
If this behaviour is changed in the future NppExec version, then it'll be included in the Notepad++ future release.
Don
OK, I'll remove it.
But after it I'll just ignore repeating questions similar to "How can I run a compiler in NppExec Console" or "Why NPP_EXEC does not run my .exe file"?