adding scripts or programs to the context menu

A script or a program can be added to the context menu by editting the registry

  1. add the text to display
    Create a new regustry key under the path:
    HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt
    The text can include an ampersand (&) character, which will cause the character that follows to be underlined and used as a shortcut key.

  2. Define the script that should be run
    Set the default value of the key to the URL of the page that contains the script you want the context menu entry to execute. This script can obtain the parent window object, the screen where the context menu item was executed, from the menuArguments property of the external object.

  3. define the context the menu item should show up in by adding the key "Contexts" under the key for the menu text. For example:

  4. HKCU\Software\Microsoft\Internet Explorer\MenuExt\<Menu Text>\Contexts
    The value of Contexts is a bit mask of the following values:
    ContextValue
    Default0x1
    Images0x2
    Controls0x4
    Tables0x8
    Text selection0x10
    Anchor0x20

    A note to programmers:Setting the value of the context to 0x1 makes the script run as if it had been called with the "showModalDialog" method. References http://msdn2.microsoft.com/en-us/library/aa753589(VS.85).aspx

Comments

This is both smart and by Tailynn (not verified)

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Image links from G2 are formatted for use with Lightbox2

More information about formatting options