|MySQL Conference and Expo April 14-17, 2008, Santa Clara, CA|
O'Reilly Book Excerpts: Amazon Hacks
Editor's note: O'Reilly's Amazon Hacks recently released, so we asked author Paul Bausch to select some hacks from the book to highlight here. Find out how to search Amazon from any web page in IE, and how to create Amazon Associate links on your Movable Type weblog. And check back to this space next week for hacks on listing your Amazon items for sale on your own web site, and on creating a wireless wish list.
Hack #11: Search Amazon from Any Web Page in IE
Searching Amazon from any web page can be as simple as highlighting and clicking with an Internet Explorer context menu.
Create a file called AmazonSearch.html and add this code:
Save it in the c:\scripts\ directory.
Next you need to add some information to your Windows registry to let Internet Explorer know where to find AmazonSearch.html, and when exactly it should be executed. You could open up a registry editor and add values manually, but it's just as easy to put the information into a .reg file and add it by double-clicking. Create a new file called AmazonContext.reg and add the following code:
TIP: Backslashes, like those in filesystem paths, need to be escaped as
Running the Hack
Be sure to shut down all running copies of Internet Explorer. Once restarted, try browsing to any web page with text. Highlight any word and click your right mouse button. You should see the new entry as shown in Figure 1-18.
Click "Search Amazon" to open a new window with your search results for that term as shown in Figure 1-19.