My new Canon scanner, the LiDE 500F, comes with a utility that listens for the scanner buttons being pressed and can kick off various activities in response. The defaults are to Copy (scan and print), Email (scan and start your email compose with the scanned file attached), Scan to PDF and Scan and open in an application of your choice.

They are all variations on a theme - scan the file and pass the result to another process. The application is called Canoscan Toolbox, and I got version 4.9.

For email, it comes with Outlook and Outlook Express as options, or just save and manually attach. Or you can define your own email client. However, the dialogue for picking your email client is just an explorer "pick file" dialogue, so you cannot enter any command-line options to tell the client what to expect.

And I use Thunderbird, and if you want to start a compose window with an attachment, you need:

thunderbird.exe -compose attachment="c:\the directory\the file"

- which cannot be done. So we have to resort to a little registry hacking. Remember kids, the registry is a scary place and you destroy your computer if you meddle unwittingly.

First, go through the pointless dialogue box to tell "canoscan" where thunderbird is, and set it as the email client.

Thunderbird will appear as the selected option in the dialogue box. Now dig out your registry editor and go here:

HKEY_USERS\[clsid]\Software\Canon\CanoScan Toolbox\4.9\Data\EmailApp

Now your clsid will be different from mine, so it may be simpler to search for "canoscan". It should be the first entry that comes up.

You will find that it contains an entry for each email destination you have defined, numbered starting from zero. Find the Thunderbird one, looking something like this:

D:\Program Files\Internet\thunderbird\thunderbird.exe

So you want to alter this entry so that it passes the correct parameters to Thunderbird. Canoscan will add the file name to the end, and luckily, thinks to enclose it in quotes.

"D:\Program Files\Internet\thunderbird\thunderbird.exe" -compose attachment=

If you want to put a default subject line in, go ahead but make sure it is prior to the attachment parameter:

"D:\Program Files\Internet\thunderbird\thunderbird.exe" -compose subject="This is the default subject",attachment=

I guess they will fix this eventually.

Friday, September 14, 2007

« Back