Page 1 of 1

Tools in the Context menu

Posted: Thu Dec 13, 2007 1:16 am
by Hot Pastrami
While setting up some custom tools in my new installation of TextPad, I had a neat idea: When right-clicking in the document area, the TextPad context menu could have a Tools sub-menu which is auto-populated by all appropriate Tools based on the Tool Parameter Macros.

For example, I have a tool that launches firefox.exe with the following argument:

"http://us.php.net/search.php?show=quick ... n=$SelWord"

..this allows me to see the PHP reference page for the currently selected word. Since it uses the $SelWord macro, TextPad knows that it applies to words, and it could be added to the context menu whenever I right-click on a word. The basic concept would also apply to $Line, $Col, $Sel, $SelLine, and maybe $Clip.

Of course, the even-easier alternative would be to just put ALL tools in a submenu of the context menu, which would be nearly as nifty.