Software

Select Search in IE

I spend most of my free time on the computer, browsing the www; reading something new and interesting and naturally you would come across something you dont understand. So, what do you do? Run a search! But currently in IE, I dont have an option to just select the text, right-click on it and launch a search. But IE has such superb context menu extensibility, its very easy to hook up a simple menu extension to do this. All you have to do is, follow the instructions in the previous link to create the menu item in IE and point it to a script which does as simple as –

<SCRIPT LANGUAGE="JavaScript">

// get the window from which the call is made
var oWin = external.menuArguments;

// get the document hosted in the window
var oDoc = oWin.document;

// get the selected text in the document
var oSelText = oDoc.selection;

// get the selected text range
var oSelRange = oSelText.createRange();

// get the selection
var queryStr = oSelRange.text;

// launch the query in the search engine
var ie = new ActiveXObject("InternetExplorer.Application");
ie.Navigate("http://www.live.com/?q=" + queryStr);
ie.visible = true;

</SCRIPT>

Check out the SelectSearch utility for IE. To install, just run the selsearchinstall.bat file. If you want to change the search engine used in the tool, just open up c:\selectsearch\selsearch.htm and change the URL in the line "ie.Navigate("http://www.live.com/?q=" + queryStr);" to the one you are interested. Here are few of the top ones –

Google – http://www.google.com/search?hl=en&q=<queryStr>
Yahoo – http://search.yahoo.com/search?p=<queryStr>
Wikipedia – http://en.wikipedia.org/wiki/Special:Search?search=<queryStr>

If I get more free time, I will write a nice little installer for this.