[ Team LiB ] Previous Section Next Section

Hack 10 Search Amazon from the IE Address Bar

figs/beginner.giffigs/hack10.gif

A fast way to search Amazon via your Windows Internet Explorer address bar.

The Internet Explorer address bar is usually where you enter a URL to browse to a web site. This hack adds the ability to do Amazon searches from the same place. Instead of visiting the site, finding the search form, typing your query, and hitting the button, you can simply type amzn [search term] to get the same results.

10.1 Setting It Up

This is extremely simple to set up, and just requires adding an entry to your Windows registry. Instead of mucking around with a registry editor, you can put the required settings into a .reg file. Once there, it's just a matter of double-clicking to install. Here are the steps:

  1. Close any open Internet Explorer windows.

  2. Open up Notepad (Start Programs Accessories Notepad) and add the following code:

    Windows Registry Editor Version 5.00
    
    [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchUrl\amzn]
    
    @="http://www.amazon.com/exec/obidos/external-search/[RETURN]
    mode=blended&keyword=%s"
  3. Save the file as AmazonSearch.reg on your desktop.

  4. Double-click the file and confirm that you want to add the information to your registry.

Restart Internet Explorer, and your Amazon search shortcut should be available.

10.2 Running the Hack

Once installed, it's just a matter of typing amzn in your address bar followed by your search term, as shown in Figure 1-16. It works the same way as entering a URL. Just hit Enter or click the Go button.

Figure 1-16. Searching Amazon from the IE address bar
figs/amzh_0116.gif

10.3 Hacking the Hack

Once you know this method of adding searches to your address bar, you can create your own specialized searches. The key pieces of the registry file are the key name (amzn in this hack), the search URL, and the term you're searching for (represented by %s in the registry file). By altering these values, you can create entirely different searches. You just need some knowledge of Amazon search URLs and some imagination.

If you want to create an address bar search for ASINs, the steps are the same as those above with a few modifications:

  1. Alter the prefix name in AmazonSearch.reg. Instead of using the key name amzn, create a new title that you'll remember (asin).

  2. Change the URL. You know the URL template for jumping directly to a book if you have the ASIN [Hack #3].

  3. Place the %s in the proper position in the URL. This variable represents everything entered after the title.

  4. Save the file as ASINSearch.reg and double-click.

The new registry file should look something like this:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchUrl\asin]

@="http://www.amazon.com/exec/obidos/ASIN/%s/"

After restarting Internet Explorer, you'll have a new search option in the address bar (see Figure 1-17).

Figure 1-17. Searching Amazon using the ASIN
figs/amzh_0117.gif

—David Yarbrough

    [ Team LiB ] Previous Section Next Section