PC Review

Thread Tools Rate Thread

Create custom context menu item for text selection

Posts: n/a
      13th Feb 2007

I'd like to add a context menu item that appears in the context menu for
selected text inside most applications. For instance, if you right-click on
text in notepad, in the RUN combo-box, or even in the text box of the "Open
URL" dialog in QuickTime, you will see that all of these "text receptacles"
get their context menu from a common place (they all share the exact same
commands in the same order, including "Right to left Reading order", "Show
unicode control characters", "Insert Unicode control character"). So
certainly this can be manipulated from somewhere? I would like to create an
item for this menu that is enabled when activated on some highlighted text,
then I would like to process that text in a script file (VBS, JS, whatever).
For instance, if the highlighted text is a valid URL, open it in a browser.
If it's an email address, start an email. If it's a word, open it up in
browser and send it to dictionary.com. Can anyone tell me how to:

A) add the menu item so it appears on the text context menu (not the context
menus for files, directories, etc, just text)
B) send the highlighted text to a VB script as a parameter (for instance,
just through it up in a msgbox, I can take it from there)
C) BONUS: if no text is highlighted, get the entire text line it was clicked

I've seen a lot about creating custom context menu items in IE or other
browsers, and also about creating custom context menus for certain
applications, but I would like this to apply to text in almost any
application (for instance, text in notepad, text in the RUN window combo
box, whatever). I know there are applications that override with their own
context menus and I don't hope to battle them, just those that use the
standard context menu. I know it's possible to customize the context menus
for file and folders (like the custom WinZip menu item), so I'm hoping it's
also possible to extend this one.

Thanks in advance!


Reply With Quote

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom context-menu item Uzi Microsoft Powerpoint 8 14th Feb 2006 01:16 PM
Context-sensitive custom menu item. Murray Microsoft Excel Programming 7 28th Dec 2005 05:55 AM
Context Menu - Microsofts standard file context menu =?Utf-8?B?TWFybg==?= Microsoft C# .NET 0 6th Dec 2004 09:49 PM
I create a menu item using VB, within a custom contacts form. I do not want the item to be visible in other forms or views. How do I do this?? Tore Microsoft Outlook Form Programming 0 10th Mar 2004 02:03 PM
Re: Contect Menu Editor (Context Menu Editor / Context Menu Manager) BillR Freeware 5 13th Aug 2003 04:40 AM




All times are GMT +1. The time now is 07:20 PM.