nppExec and toolbar button

NppExec
wilhelm71
2012-07-11
2013-05-21
  • wilhelm71

    wilhelm71 - 2012-07-11

    Hi,

    I am using nppExec with success so far to create my EDI for an inhouse language we use at our company.  I am using nppExec to run external commands to compile, beautify  and externally search our software repository.  All of these things are remotely on unix servers, so a combination of nppExec and c:\cygwin\bin\rexec are needed to get that going.

    Ok, what I stumbled across now that I got everything in place is the accessibility of these seperate commands I set up in nppExec.  It would be great to have them in the toolbar somewhere, or in a "main menu"… I allready have key shortcuts, but  toolbar buttons would be much more helpfull.  There is one button in the plugin which I can assign, but that is not really enough as you cannot select which command/script it will execute.  I ideally need 5  buttons to execute 5 different script.

    I have been playing with the customizetoolbar plugin, but I just can't get the two to connect.

    Has anyone any idea how to get this to work?

    Thanks
    DaC

     
  • DV

    DV - 2012-07-11

    NppExec supports "plugin communication interface" which allows other plugins to send commands to NppExec. You can look at NppExecPluginMsgTester inside NppExec's sources and use its code partly or entirely. The NppExecPluginMsgTester uses a "wrapper" of messages declared inside "NppExec\src\PluginCommunication\nppexec_msgs.h". In particular, use NPEM_NPPEXEC to execute some script.

     
  • wilhelm71

    wilhelm71 - 2012-07-11

    Thanks…. I might do that, but I am more a user of notepad, and I have no dev environment for plugins setup, and don't know if I will get the time do look at that.    I was more hoping for something that allready was in place, but perhaps not documented well.

     
  • DV

    DV - 2012-07-11

    You can try to add needed commands to Notepad++'s context menu. For that, you should modify "contextMenu.xml" either directly or using main menu Settings -> Edit Popup ContextMenu. 
    The line to be added should be similar to: 
    <Item FolderName="NppExec commands" PluginEntryName="NppExec" PluginCommandItemName="name_of_your_script" />

     
  • DV

    DV - 2012-07-11

    * name_of_your_script is the menu item name that you created under NppExec Advanced Options.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks