How do I add an editor to IE's context menu in open web pages?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All,

I want to add the code editor UltraEdit32 to the IE context menu, without
changing the default app for the "View Source" command. Some apps, like MS
Excel, put external commands there, so this should be possible, no?

I'm not talking about files in Windows Explorer, rather the context menu you
get when r-clicking an open web page in IE.
screenshot: http://geocities.com/coyotewrw/media/screenie.jpg

I've already added UltraEdit32 to:
"HKEY_CLASSES_ROOT\.htm\OpenWithList"
So it shows up in the Internet Options cpanel applet under "Programs/HTML
Editor". It also works fine in the list of editors in the IE toolbar button.

Since the toolbar isn't always available (active desktop, vb scripted pages,
popups, etc.), I'd like to have the choice of either the default "View
Source" editor (MS Frontpage) or UltraEdit32.

I haven't been successful hacking the registry myself, nor have I found any
useful info via Google. I've added an entry for UltraEdit32 in:
"HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt"
....but I'm getting the syntax wrong, I suspect esp. in the "contexts" DWORD
value. My "Open in UltraEdit32" shows up in the context menu, but nothing
happens when I try it.

A normal "open" shell value for UE32 is:
"C:\Program Files\UltraEdit\uedit32.exe" "%1"

Does anyone here know how I should change it for MenuExt, and what the DWORD
value should be?

Thanks!
 
Sorry, no. As previously stated, I've *already* added UE32 to the list of
editors, and I DO NOT want to make it the default editor. What I want is to
add it to the context menu so that I can choose to edit a page in the default
"View Source" editor OR UltraEdit.

I think you'll see what I mean if you look at the screenshot I've provided...
http://geocities.com/coyotewrw/media/screenie.jpg
 
Actually, I did a few days ago. I'm embarrassed to say that some of it was
over my head, esp. Step 2:

"Set the default value of the key to the URL of the page that contains the
script you want the context menu entry to execute. This script can obtain the
parent window object, the screen where the context menu item was executed,
from the menuArguments property of the external object."

The other entries in the MenuExt key just have commandlines, such as:

[subkey name] E&xport to Microsoft Excel
[string value] res://C:\PROGRA~1\MICROS~2\OFFICE11\EXCEL.EXE/3000
[dword name] contexts [dword value] 0x00000001(1)

I haven't found anything about creating this type of reg entry, or didn't
understand it when I did. It's starting to feel like a snipe hunt :P
 
Yes, some MSDN stuff is hard to read and I don't pretend to understand
all that page.
What dword values have you tried for contexts?
Have you tried 21 (default+anchor)

....Alan
--
Alan Edwards, MS MVP Windows - Internet Explorer
http://dts-l.org/index.html



Actually, I did a few days ago. I'm embarrassed to say that some of it was
over my head, esp. Step 2:

"Set the default value of the key to the URL of the page that contains the
script you want the context menu entry to execute. This script can obtain the
parent window object, the screen where the context menu item was executed,
from the menuArguments property of the external object."

The other entries in the MenuExt key just have commandlines, such as:

[subkey name] E&xport to Microsoft Excel
[string value] res://C:\PROGRA~1\MICROS~2\OFFICE11\EXCEL.EXE/3000
[dword name] contexts [dword value] 0x00000001(1)

I haven't found anything about creating this type of reg entry, or didn't
understand it when I did. It's starting to feel like a snipe hunt :P

Alan Edwards said:
I can't help on the fine detail as I have not looked at this for years
but have you read this?

Adding Entries to the Standard Context Menu:
http://msdn.microsoft.com/workshop/browser/ext/tutorials/context.asp

....Alan
 
Just tried it. No go, unfortunately. I'm also not sure what the string should
be. I've so far tried:
res://"C:\Program Files\UltraEdit\uedit32.exe" "%1"
res://C:\Progra~1\UltraE~1\uedit32.exe %1
"C:\Program Files\UltraEdit\uedit32.exe" "%1"
C:\Progra~1\UltraE~1\uedit32.exe %1

....and some other variations with and without the quotes. Any thoughts?
Thanks, btw, for pitching in. I can certainly use a hand here. :)

Alan Edwards said:
Yes, some MSDN stuff is hard to read and I don't pretend to understand
all that page.
What dword values have you tried for contexts?
Have you tried 21 (default+anchor)

....Alan
--
Alan Edwards, MS MVP Windows - Internet Explorer
http://dts-l.org/index.html



Actually, I did a few days ago. I'm embarrassed to say that some of it was
over my head, esp. Step 2:

"Set the default value of the key to the URL of the page that contains the
script you want the context menu entry to execute. This script can obtain the
parent window object, the screen where the context menu item was executed,
from the menuArguments property of the external object."

The other entries in the MenuExt key just have commandlines, such as:

[subkey name] E&xport to Microsoft Excel
[string value] res://C:\PROGRA~1\MICROS~2\OFFICE11\EXCEL.EXE/3000
[dword name] contexts [dword value] 0x00000001(1)

I haven't found anything about creating this type of reg entry, or didn't
understand it when I did. It's starting to feel like a snipe hunt :P

Alan Edwards said:
I can't help on the fine detail as I have not looked at this for years
but have you read this?

Adding Entries to the Standard Context Menu:
http://msdn.microsoft.com/workshop/browser/ext/tutorials/context.asp

....Alan
--
Alan Edwards, MS MVP Windows - Internet Explorer
http://dts-l.org/index.html



On Fri, 28 Apr 2006 08:49:02 -0700, in
microsoft.public.windows.inetexplorer.ie6.browser, coyotewrw

Hi All,

I want to add the code editor UltraEdit32 to the IE context menu, without
changing the default app for the "View Source" command. Some apps, like MS
Excel, put external commands there, so this should be possible, no?

I'm not talking about files in Windows Explorer, rather the context menu you
get when r-clicking an open web page in IE.
screenshot: http://geocities.com/coyotewrw/media/screenie.jpg

I've already added UltraEdit32 to:
"HKEY_CLASSES_ROOT\.htm\OpenWithList"
So it shows up in the Internet Options cpanel applet under "Programs/HTML
Editor". It also works fine in the list of editors in the IE toolbar button.

Since the toolbar isn't always available (active desktop, vb scripted pages,
popups, etc.), I'd like to have the choice of either the default "View
Source" editor (MS Frontpage) or UltraEdit32.

I haven't been successful hacking the registry myself, nor have I found any
useful info via Google. I've added an entry for UltraEdit32 in:
"HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt"
...but I'm getting the syntax wrong, I suspect esp. in the "contexts" DWORD
value. My "Open in UltraEdit32" shows up in the context menu, but nothing
happens when I try it.

A normal "open" shell value for UE32 is:
"C:\Program Files\UltraEdit\uedit32.exe" "%1"

Does anyone here know how I should change it for MenuExt, and what the DWORD
value should be?

Thanks!
 
I don't have UltraEdit but if I get the time, I will experiment a bit
with something else.
What about just:
res://C:\Progra~1\UltraE~1\uedit32.exe
That seems to be the format of most of mine.
Some are quoted, some are not.
Some have res:// but some do not.
None has the %1 placeholder.

I assume XP from the look of your Excel string, though it probably is
not relevant.

....Alan
--
Alan Edwards, MS MVP Windows - Internet Explorer
http://dts-l.org/index.html




Just tried it. No go, unfortunately. I'm also not sure what the string should
be. I've so far tried:
res://"C:\Program Files\UltraEdit\uedit32.exe" "%1"
res://C:\Progra~1\UltraE~1\uedit32.exe %1
"C:\Program Files\UltraEdit\uedit32.exe" "%1"
C:\Progra~1\UltraE~1\uedit32.exe %1

...and some other variations with and without the quotes. Any thoughts?
Thanks, btw, for pitching in. I can certainly use a hand here. :)

Alan Edwards said:
Yes, some MSDN stuff is hard to read and I don't pretend to understand
all that page.
What dword values have you tried for contexts?
Have you tried 21 (default+anchor)

....Alan
--
Alan Edwards, MS MVP Windows - Internet Explorer
http://dts-l.org/index.html



Actually, I did a few days ago. I'm embarrassed to say that some of it was
over my head, esp. Step 2:

"Set the default value of the key to the URL of the page that contains the
script you want the context menu entry to execute. This script can obtain the
parent window object, the screen where the context menu item was executed,
from the menuArguments property of the external object."

The other entries in the MenuExt key just have commandlines, such as:

[subkey name] E&xport to Microsoft Excel
[string value] res://C:\PROGRA~1\MICROS~2\OFFICE11\EXCEL.EXE/3000
[dword name] contexts [dword value] 0x00000001(1)

I haven't found anything about creating this type of reg entry, or didn't
understand it when I did. It's starting to feel like a snipe hunt :P

:

I can't help on the fine detail as I have not looked at this for years
but have you read this?

Adding Entries to the Standard Context Menu:
http://msdn.microsoft.com/workshop/browser/ext/tutorials/context.asp

....Alan
--
Alan Edwards, MS MVP Windows - Internet Explorer
http://dts-l.org/index.html



On Fri, 28 Apr 2006 08:49:02 -0700, in
microsoft.public.windows.inetexplorer.ie6.browser, coyotewrw

Hi All,

I want to add the code editor UltraEdit32 to the IE context menu, without
changing the default app for the "View Source" command. Some apps, like MS
Excel, put external commands there, so this should be possible, no?

I'm not talking about files in Windows Explorer, rather the context menu you
get when r-clicking an open web page in IE.
screenshot: http://geocities.com/coyotewrw/media/screenie.jpg

I've already added UltraEdit32 to:
"HKEY_CLASSES_ROOT\.htm\OpenWithList"
So it shows up in the Internet Options cpanel applet under "Programs/HTML
Editor". It also works fine in the list of editors in the IE toolbar button.

Since the toolbar isn't always available (active desktop, vb scripted pages,
popups, etc.), I'd like to have the choice of either the default "View
Source" editor (MS Frontpage) or UltraEdit32.

I haven't been successful hacking the registry myself, nor have I found any
useful info via Google. I've added an entry for UltraEdit32 in:
"HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt"
...but I'm getting the syntax wrong, I suspect esp. in the "contexts" DWORD
value. My "Open in UltraEdit32" shows up in the context menu, but nothing
happens when I try it.

A normal "open" shell value for UE32 is:
"C:\Program Files\UltraEdit\uedit32.exe" "%1"

Does anyone here know how I should change it for MenuExt, and what the DWORD
value should be?

Thanks!
 
@Alan: Yeah, forgot to mention that, sorry. Didn't work w/out the %1 either.
@Jon: Just tried "file://", no go. Thanks, tho, and yes, that's a good idea
about posting to the UE forum. I'll check the links, too.

I think the problem with this blind experimentation is that there seem to be
a lot of variables in both the string and dword entries, so getting them both
right without some kind of guide is gonna be hard.

I can always just stick with Frontpage as the editor, but there's that 10%
of the time that I need UE32 cuz it doesn't screw up - err, "fix" - the code.
Plus I hate it when the computer wins :P
 
IIRC, the "menuext" should point to a script (can't directly launch an .exe
file). The following code can launch the specified program (and passes the
document URL)

<SCRIPT>
var shell = new ActiveXObject("WScript.Shell");
shell.run("ultraedit.exe \"" + external.menuArguments.document + "\"");
</SCRIPT>

This however does not accomplish what you need. For viewing the source, the
argument should be the Path & name of the locally cached file. The name of
the cached file can only be found using API. So you'll have to write a
program to do that, and then pass the file name to Ultraedit.

See
http://groups.google.com/group/micr...ng.webbrowser_ctl/msg/9b7b4a4ca43a010e?hl=en&

You may try this in programming groups as well.

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


@alan: Yeah, forgot to mention that, sorry. Didn't work w/out the %1 either.
@jon: Just tried "file://", no go. Thanks, tho, and yes, that's a good idea
about posting to the UE forum. I'll check the links, too.

I think the problem with this blind experimentation is that there seem to be
a lot of variables in both the string and dword entries, so getting them
both
right without some kind of guide is gonna be hard.

I can always just stick with Frontpage as the editor, but there's that 10%
of the time that I need UE32 cuz it doesn't screw up - err, "fix" - the
code.
Plus I hate it when the computer wins :P
 
Correction:

IIRC, the "menuext" should point to a script (can't directly launch an .exe
file). The following code can launch the specified program (and passes the
document URL)

<SCRIPT>
var shell = new ActiveXObject("WScript.Shell");
shell.run("ultraedit.exe \"" + external.menuArguments.document.URL + "\"");
</SCRIPT>

This however does not accomplish what you need. For viewing the source, the
argument should be the Path & name of the locally cached file. The name of
the cached file can only be found using API. So you'll have to write a
program to do that, and then pass the file name to Ultraedit.

See
http://groups.google.com/group/micr...ng.webbrowser_ctl/msg/9b7b4a4ca43a010e?hl=en&

You may try this in programming groups as well.

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


IIRC, the "menuext" should point to a script (can't directly launch an .exe
file). The following code can launch the specified program (and passes the
document URL)

<SCRIPT>
var shell = new ActiveXObject("WScript.Shell");
shell.run("ultraedit.exe \"" + external.menuArguments.document + "\"");
</SCRIPT>

This however does not accomplish what you need. For viewing the source, the
argument should be the Path & name of the locally cached file. The name of
the cached file can only be found using API. So you'll have to write a
program to do that, and then pass the file name to Ultraedit.

See
http://groups.google.com/group/micr...ng.webbrowser_ctl/msg/9b7b4a4ca43a010e?hl=en&

You may try this in programming groups as well.

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


@alan: Yeah, forgot to mention that, sorry. Didn't work w/out the %1 either.
@jon: Just tried "file://", no go. Thanks, tho, and yes, that's a good idea
about posting to the UE forum. I'll check the links, too.

I think the problem with this blind experimentation is that there seem to be
a lot of variables in both the string and dword entries, so getting them
both
right without some kind of guide is gonna be hard.

I can always just stick with Frontpage as the editor, but there's that 10%
of the time that I need UE32 cuz it doesn't screw up - err, "fix" - the
code.
Plus I hate it when the computer wins :P
 
Hmmm... Maybe I'm going about this from the wrong direction. Since Excel,
being an MS product, seems to be the exception to the rule that MenuExt can't
launch executables:
res://C:\PROGRA~1\MICROS~2\OFFICE11\EXCEL.EXE/3000
Perhaps I can create a MenuExt entry for Frontpage and set UE32 as the
default "View Source" editor.

I just tried
res://C:\PROGRA~1\MICROS~2\OFFICE11\FRONTPG.EXE/3000
but it didn't work. I'm going to look into this some more, see if there's a
different switch that will work. What do you guys think of this idea?

Also, I want to thank all of you for helping out. Hopefully an answer to
this will be useful to you, as well. :)

Ramesh said:
Correction:

IIRC, the "menuext" should point to a script (can't directly launch an .exe
file). The following code can launch the specified program (and passes the
document URL)

<SCRIPT>
var shell = new ActiveXObject("WScript.Shell");
shell.run("ultraedit.exe \"" + external.menuArguments.document.URL + "\"");
</SCRIPT>

This however does not accomplish what you need. For viewing the source, the
argument should be the Path & name of the locally cached file. The name of
the cached file can only be found using API. So you'll have to write a
program to do that, and then pass the file name to Ultraedit.

See
http://groups.google.com/group/micr...ng.webbrowser_ctl/msg/9b7b4a4ca43a010e?hl=en&

You may try this in programming groups as well.

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


IIRC, the "menuext" should point to a script (can't directly launch an .exe
file). The following code can launch the specified program (and passes the
document URL)

<SCRIPT>
var shell = new ActiveXObject("WScript.Shell");
shell.run("ultraedit.exe \"" + external.menuArguments.document + "\"");
</SCRIPT>

This however does not accomplish what you need. For viewing the source, the
argument should be the Path & name of the locally cached file. The name of
the cached file can only be found using API. So you'll have to write a
program to do that, and then pass the file name to Ultraedit.

See
http://groups.google.com/group/micr...ng.webbrowser_ctl/msg/9b7b4a4ca43a010e?hl=en&

You may try this in programming groups as well.

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


@Alan: Yeah, forgot to mention that, sorry. Didn't work w/out the %1 either.
@Jon: Just tried "file://", no go. Thanks, tho, and yes, that's a good idea
about posting to the UE forum. I'll check the links, too.

I think the problem with this blind experimentation is that there seem to be
a lot of variables in both the string and dword entries, so getting them
both
right without some kind of guide is gonna be hard.

I can always just stick with Frontpage as the editor, but there's that 10%
of the time that I need UE32 cuz it doesn't screw up - err, "fix" - the
code.
Plus I hate it when the computer wins :P

Jon Kennedy said:
I think the Default value should be -

file://C:\Program Files\UltraEdit\Uedit32.exe

Don't know about adding the "%1" bit at the end - try it with and without
quotes.

More help here:
http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/overview/Overview.asp -
see the "controlling context menus" section.

Or you could ask or look in UE's forums:
http://www.ultraedit.com/index.php?name=Forums&c=1

--

Jon R. Kennedy MS MVP/IE
Charlotte, NC USA
(e-mail address removed)
 
MS product, seems to be the exception to the rule that MenuExt can't
It's not an executable, but points to a script embedded inside that module.

Res protocol:
http://msdn.microsoft.com/library/default.asp?url=/workshop/networking/predefined/res.asp


--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


Hmmm... Maybe I'm going about this from the wrong direction. Since Excel,
being an MS product, seems to be the exception to the rule that MenuExt
can't
launch executables:
res://C:\PROGRA~1\MICROS~2\OFFICE11\EXCEL.EXE/3000
Perhaps I can create a MenuExt entry for Frontpage and set UE32 as the
default "View Source" editor.

I just tried
res://C:\PROGRA~1\MICROS~2\OFFICE11\FRONTPG.EXE/3000
but it didn't work. I'm going to look into this some more, see if there's a
different switch that will work. What do you guys think of this idea?

Also, I want to thank all of you for helping out. Hopefully an answer to
this will be useful to you, as well. :)
 
Do you think there might be a corresponding script embedded in Frontpage,
Word, etc.? That woud actually be *very* useful, as I could setup commands
for each Office product.

I just tried Google, but I'm not really sure what phrases to look for...

Ramesh said:
It's not an executable, but points to a script embedded inside that module.

Res protocol:
http://msdn.microsoft.com/library/default.asp?url=/workshop/networking/predefined/res.asp


--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


Hmmm... Maybe I'm going about this from the wrong direction. Since Excel,
being an MS product, seems to be the exception to the rule that MenuExt
can't
launch executables:
res://C:\PROGRA~1\MICROS~2\OFFICE11\EXCEL.EXE/3000
Perhaps I can create a MenuExt entry for Frontpage and set UE32 as the
default "View Source" editor.

I just tried
res://C:\PROGRA~1\MICROS~2\OFFICE11\FRONTPG.EXE/3000
but it didn't work. I'm going to look into this some more, see if there's a
different switch that will work. What do you guys think of this idea?

Also, I want to thank all of you for helping out. Hopefully an answer to
this will be useful to you, as well. :)
 
I just found the solution. There is a Maxthon plugin that actually works on
webpages displayed in almost any browser, incuding IE and the Windows Active
Desktop.

It's the "ViewPartialSource! Menu Extension" and it adds a context menu item
to view the html of the currently selected text, image, etc. However, if
nothing is selected it will open the *entire* page in the editor of your
choice (default is Notepad.) I had no trouble at all setting it to use UE32.

It's freeware and is available here:
http://tara.maxthon.com/index.php?act=view&id=268

So now, I can use UE32 when I need to do a quick edit without launching all
the graphics, etc. in Frontpage. Sweet!

coyotewrw said:
Do you think there might be a corresponding script embedded in Frontpage,
Word, etc.? That woud actually be *very* useful, as I could setup commands
for each Office product.

I just tried Google, but I'm not really sure what phrases to look for...

Ramesh said:
MS product, seems to be the exception to the rule that MenuExt can't
launch executables:

It's not an executable, but points to a script embedded inside that module.

Res protocol:
http://msdn.microsoft.com/library/default.asp?url=/workshop/networking/predefined/res.asp


--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


Hmmm... Maybe I'm going about this from the wrong direction. Since Excel,
being an MS product, seems to be the exception to the rule that MenuExt
can't
launch executables:
res://C:\PROGRA~1\MICROS~2\OFFICE11\EXCEL.EXE/3000
Perhaps I can create a MenuExt entry for Frontpage and set UE32 as the
default "View Source" editor.

I just tried
res://C:\PROGRA~1\MICROS~2\OFFICE11\FRONTPG.EXE/3000
but it didn't work. I'm going to look into this some more, see if there's a
different switch that will work. What do you guys think of this idea?

Also, I want to thank all of you for helping out. Hopefully an answer to
this will be useful to you, as well. :)
 
Back
Top