[IE tip] Add "Copy Image Location" menu item

Discussion in 'Windows Desktop Systems' started by NetRyder, Aug 9, 2005.

  1. NetRyder

    NetRyder Tech Junkie Folding Team

    Messages:
    13,256
    Location:
    New York City
    Cross posting this from my blog...

     
  2. zeke_mo

    zeke_mo (value not set) Staff Member Political User Folding Team

    Messages:
    1,984
    Location:
    Placerville, CA
    Im still waiting for a "Open link in Firefox" option :p

    Ill still do this one anyway...
     
  3. NetRyder

    NetRyder Tech Junkie Folding Team

    Messages:
    13,256
    Location:
    New York City
    Hehe, I don't have Firefox installed right now. I'll download it and try to write something. Shouldn't be too difficult. :)
     
    Last edited: Aug 9, 2005
  4. NetRyder

    NetRyder Tech Junkie Folding Team

    Messages:
    13,256
    Location:
    New York City
    Ok, here you go. Same basic concept.
    Toss the code into an html file, create a new sub-key under MenuExt ("Open Link in Firefox"), and set the Default value to the path of the html file. This time you'll want to give the Contexts DWORD a hex value of 20 (that's decimal 32), so that it only appears when you right-click hyperlinks.

    Code:
    <script language="JavaScript"> 
    var foo = new ActiveXObject("WScript.Shell"); 
    foo.Run("Firefox " + external.menuArguments.event.srcElement); 
    </script>
     
  5. NetRyder

    NetRyder Tech Junkie Folding Team

    Messages:
    13,256
    Location:
    New York City
    You know, this is actually fun to play with! Here are two more I thought of. Very simple, but quite handy - highlight text and search for it on Google or Dictionary.com.
    I call the menu items "Google It!" and "Define It!" :D

    Google It!
    Code:
    <script language="JavaScript">
    open('http://dictionary.reference.com/search?q=' + external.menuArguments.document.selection.createRange().text);
    </script>
    Define It!
    Code:
    <script language="JavaScript">
    open('http://www.google.com/search?q=' + external.menuArguments.document.selection.createRange().text);
    </script>
    You can add Wikipedia, Yahoo, or whatever else you want using the same syntax...even a mapping service to search for street addresses. This time, set the Contexts DWORD value to hex 10 (that's decimal 16) so that the items appear only when you right-click highlighted text.
     
  6. gonaads

    gonaads Beware the G-Man Political User Folding Team

    Someone's bored. :rolleyes: :p


    Seriously though, Good tips NetRyder. :D
     
  7. zeke_mo

    zeke_mo (value not set) Staff Member Political User Folding Team

    Messages:
    1,984
    Location:
    Placerville, CA
    I dont see that in my reg, is that a vista only feature?
     
  8. NetRyder

    NetRyder Tech Junkie Folding Team

    Messages:
    13,256
    Location:
    New York City
    HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt
    If you don't see the MenuExt key, just create one. It probably gets created by the first menu extension that's added (mine was the "Export to Microsoft Excel" one created during the Office 2003 install). It's definitely not a Vista-specific feature though. :)
     
    madmatt likes this.
  9. madmatt

    madmatt Bow Down to the King Political User

    Messages:
    13,312
    Location:
    New York
    I'm impressed NR.
     
  10. NetRyder

    NetRyder Tech Junkie Folding Team

    Messages:
    13,256
    Location:
    New York City
    Thanks Matt. :)
     
  11. GummyBear

    GummyBear OSNN One Post Wonder

    Messages:
    1
    Nice work.

    Is there any way to create a context menu in IE that would send an image to an external program?

    For example, I right click on an image and select "Send to Photoshop"?

    Thanks!