How to catch clicks from IE and NN like all the download programs do?
Posted on 2002-09-15 05:49:00 by Christopher
You can do this through changing a registry key. Dunno which one, but a search in the registry editor for the text which your download manager puts in the browser (for example "Download with StarDownloader") might help. :)
Posted on 2002-09-15 05:55:23 by bazik
You can add a menu item to the right-click-menu that appears when you right-click on a link. You can add a URL that the browser goes to if the user clicked on the menu-item. But I want to catch the download when the user left-click on the link... Not trought a menu...
Posted on 2002-09-15 06:02:25 by Christopher
That works similar :)
Search google for the regkey of the right-click menu and it might bring up some usefull information :)
Posted on 2002-09-15 06:24:44 by bazik
if you use a program like edonkey you'll see that it adds a handler for

ed2k:// urls in the registry (install edonkey2000 and search for ed2k:// in the registry )


this is just associated with an app

I gather that the handling of http:// can be intercepted in a similar matter.
Posted on 2002-09-15 08:34:25 by Hiroshimator
HI!
For IE v. >=5.5 You can write custom DL manager by Implementing IDownloadManager (and IUnknown) interfaces.

IDownloadManager has only one f-n, IDownloadManager:Download.

Consult these in MSDN if interseted:
http://msdn.microsoft.com/workshop/browser/ext/reference/ifaces/idownloadmanager/idownloadmanager.asp
====================
Now about menus:
1. This will I think draw extra button on the IE toolbar:


"ButtonText"="FlashGet"
"Default Visible"="Yes"
"Exec"="C:\\Program Files\\Internet\\DL\\FlashGet\\flashget.exe"
"HotIcon"="C:\\Program Files\\Internet\\DL\\FlashGet\\flashget.exe,128"
"Icon"="C:\\Program Files\\Internet\\DL\\FlashGet\\flashget.exe,223"
"CLSID"="{1FBA04EE-3024-11d2-8F1F-0000F87ABD16}"
"MenuStatusBar"="FlashGet"
"MenuText"="&FlashGet"

2. End this will add an extra menu Item to IE:

@="C:\\Program Files\\Internet\\DL\\FlashGet\\jc_link.htm"
"contexts"=dword:00000022

In jc_link.htm You'll have to parse OnContextMenu , this will pas URL string and optionally description to Your
function ("AddURL"), This f-n must implemented in COM .dll .
This .dll will be registering it's CLSID and thus available for script langs like VBScript to instantiate her object.
In this .dll You can impement your own Interface (say, IJetCarCatch), and call it's f-ns (AddURL).

You can get yourself a copy of FlashGet at http://www.flashget.com (former "JetCar") and look at how it all implemented.

I know this may all sound a bit hard, but hey, it's not that hard - it's the way these DL managers use.

:grin:
Posted on 2002-09-15 17:26:38 by Andycar