Add a program to IE's right click mouse menu?

K

Kaidi

Hi Guys,

I am writing a program and I want to add it to windows IE's right
click menu (through java programming, not manually edit any windows
setting, of course).
That is: when a user right click the mouse in IE, he can select my
program to run.
Any one know how can I do that? My feeling is I need to use some OS
related (WinXP, etc) calls/functions. But I have no clue of it yet.

Also, using java, is there any way for me to get the URL the IE is
currently displaying? I want the user right click the page in IE,
select my program, then my program can process the page.

Thanks a lot.
 
A

Andrew Thompson

I am writing a program and I want to add it to windows IE's right
click menu (through java programming, not manually edit any windows
setting, of course).

Why just Windows IE?
That is: when a user right click the mouse in IE, he ..

Use 'they'. It means 'he or she or them'.
You want to sell to everyone, right?
...My feeling is I need to use some OS
related (WinXP, etc) calls/functions.

My feeling is that a project for IE in Windows is best done
with .Net.

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.lensescapes.com/ Images that escape the mundane
 
B

Ben_

At some point, you'll need the user to run an installation for you to
register your context menu extension and install the application to handle
the menu action.

The key to IE's context menu extension is
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt.

See http://msdn.microsoft.com/workshop/browser/ext/extensions.asp in
particular, and
http://msdn.microsoft.com/workshop/browser/ext/tutorials/menu.asp in
general.

To modify the registry in java you need some native code to wrap calls to
Win32 APIs (there are different implementations freely available but I can't
remember one out of my head right now though). An alternate solution is to
launch "regedit myfile.reg /S" (if I remember correctly with /S you don't
get a popup).

As to how to retrieve the current URL, I suppose it's available somehow :),
but I don't know specifically in this case. I did it with a Javascript
extension and it is available via 'external.menuArguments.location.href'. As
you'll see it from the registry, the "classical" way to do this is to
register an HTML page with javascript, which has then access to the special
menuArguments object. From there you could launch your app. To get a feeling
of this, you can look at the registry keys and at %WINDIR%\Web, where the
extensions are usually installed.

HTH.
 
R

ras_nas

Andrew Thompson said:
On 28 Sep 2004 14:56:20 -0700, Kaidi wrote:

Use 'they'. It means 'he or she or them'.
You want to sell to everyone, right?

By the time Kaidi reached the 'he' , they were too lazy to go back and
change 'a user' to 'users' , so the 'he' remained :p

Rico.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top