<div dir="ltr">Hi Yann,<div><br></div><div>it's grayed out because it tests if it's a working grass command (for example r.in.lidar is grayed when you don't compile grass with liblas). You can try to apply this patch which tests if the command looks like grass command (regular expression) and if it is not, it doesn't disable it in menu.</div>

<div><br></div><div><div>Index: gui_core/menu.py</div><div>===================================================================</div><div>--- gui_core/menu.py<span class="" style="white-space:pre">    </span>(revision 60284)</div>

<div>+++ gui_core/menu.py<span class="" style="white-space:pre">        </span>(working copy)</div><div>@@ -18,7 +18,7 @@</div><div> @author Robert Szczepanek (menu customization)</div><div> @author Vaclav Petras <wenzeslaus <a href="http://gmail.com">gmail.com</a>> (menu customization)</div>

<div> """</div><div>-</div><div>+import re</div><div> import wx</div><div> </div><div> from core              import globalvar</div><div>@@ -91,7 +91,8 @@</div><div>                 cmd = utils.split(str(command)) </div>

<div>             except UnicodeError: </div><div>                 cmd = utils.split(EncodeString((command))) </div><div>-            if cmd and cmd[0] not in globalvar.grassCmd: </div><div>+            if cmd and cmd[0] not in globalvar.grassCmd and \</div>

<div>+               re.match('[rvdipmgt][3bs]?\.([a-z0-9\.])+', cmd[0]):</div><div>                 menuItem.Enable(False)</div><div> </div><div>         rhandler = eval('self.parent.' + handler)</div><div>

<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, May 16, 2014 at 12:30 AM, Yann Chemin <span dir="ltr"><<a href="mailto:ychemin@gmail.com" target="_blank">ychemin@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">in svn/gui/wxpython/lmgr/frame.py<br>
line 758<br>
by adding:<br>
<br>
    def RunCmd(self, event = None, cmd = []):<br>
        """!Run command to system from menu"""<br>
        if event:<br>
            cmd = self.GetMenuCmd(event)<br>
        os.system(cmd)<br>
<br></blockquote><div><br></div><div>I am not sure if this is needed. I would say it might work without this change but you have to try it out.</div><div><br></div><div><br></div><div>Best,</div><div><br></div><div>Anna</div>

<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
it should handle it, however, it seems that a flag is needed to enable<br>
the possibility to click the command from the created menu. It is<br>
still grey/shadowed.<br>
<div class=""><div class="h5"><br>
<br>
<br>
On 16/05/2014, Yann Chemin <<a href="mailto:ychemin@gmail.com">ychemin@gmail.com</a>> wrote:<br>
> To be precise, the non-GRASS programs have their own GUI already, and<br>
> the calls need only one word.<br>
><br>
> On 16/05/2014, Yann Chemin <<a href="mailto:ychemin@gmail.com">ychemin@gmail.com</a>> wrote:<br>
>> Hi,<br>
>><br>
>> I would like to make a customized toolbox to call some non-GRASS CLI<br>
>> programs.<br>
>><br>
>> Handlers OnMenuCmd and RunMenuCmd seem not to work. The menu items are<br>
>> grey/shadowed so that no mouse click is allowed on them.<br>
>><br>
>> thanks<br>
>> Yann<br>
>> --<br>
>> ----<br>
>><br>
><br>
><br>
> --<br>
> ----<br>
><br>
<br>
<br>
--<br>
----<br>
_______________________________________________<br>
grass-dev mailing list<br>
<a href="mailto:grass-dev@lists.osgeo.org">grass-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-dev</a><br>
</div></div></blockquote></div><br></div></div></div>