I was reading Michael Earl's blog (aka The Cerebal Kitchen) this morning and came across his “Idea brain dump”.  One of the items caught my eye, and so I decided to make it happen...  That is, the “mark a url for followup” idea.

The basic idea is to make a right-click (context) menu item appear when you right click on a hyper link. This menu item would then add a task to your task list to follow up on the link you clicked. 

The scary thing is, I don't think people realize just how easy it is to add context menu items to IE.  It involves just two things:

  1. A html file containing a script (or a script file)
  2. A single entry in the registry.

In fact, this particular item is so easy that with just a few lines of VBScript in an html page, and I have a single file that both gives instructions on how to install the menu item, and the menu item handler itself! (see the single htm page that implements this idea here).  For more information on this method, see the “Adding Entries to the Standard Context Menu“ topic on MSDN.


But where's the fun? (more specifically, where's the user-friendly .net?) I went ahead and implemented it again as a .net application, just so you could use it (if you wanted to) as an example of how to make a .net-written IE menu extension application.  Here's how it works

  • When run with no arguments or “/configure“, a config dialog opens up. This dialog allows you to install the handler, remove the handler, and set the default title and body of the task item
  • When run with “/install“ (or you click the install button), the .net app registers itself as a COM callable assembly, pulls the script file out of its own resources, and sets the IE registry keys to point at the new script file.
  • When run with “/remove“ (or you click remove button), it unregisters the right-click menu item from IE and unregisters itself as a COM-callable assembly.

When you actually right-click an anchor tag in IE after installing it, IE calls the script file that was created. This script file then just does a simple CreateObject() to get the .net assembly, and calls a method in it.  A bit of overkill for somthing that can be handled entirely in script, but hey... I did do it that way as well.

You can either get the single-file Followup URL Executable (11KB zipped)
Or, get the Followup URL source code & Executable (22KB zipped)

A note - because it's being treated as a COM object, the assembly will be locked once used untill all IE instances are killed.  Also, I don't think creating the actual script file is needed -- I will look into the “res://“ uri prefix for pulling the script directly out of the executable's resource table.

[Update 5/13/04] - I've created a GotDotNet workspace for this (see comments).