Re: Right click word look up

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



See also:

Right-Click Dictionary Download - MSN Encarta:
http://uk.encarta.msn.com/encnet/features/dictionary/quick_dictionary_download.aspx

--
Regards,

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


"Ramesh, MS-MVP" <ramesh@xxxxxxxxxxxx> wrote in message
news:%23Yl37UbfGHA.3888@xxxxxxxxxxxxxxxxxxxxxxx
Hi Antonio,

JS or VBS would be fine. This is what I use (searches Dictionary.com). The
following code base is actually from "Google Search" menu extension, and
I've modified it a bit.

<html>
<script language="JavaScript" defer>
var parentwin = external.menuArguments;
var doc = parentwin.document;
var sel = doc.selection;
var rng = sel.createRange();
var strhtml = new String(rng.htmlText);
var str = strhtml.replace(/<[^>]*>/g," ");
str = str.replace(/\s+/g, " ");
str = str.replace(/^\s*/,"");
str = str.replace(/\s*$/,"");
if (str.indexOf(" ") != -1)
str = '"' + str + '"';
var bnewwindow = external.menuArguments.event.shiftKey;
var url = "http://www.dictionary.com/search?q="; + escape(str);

try {
url = gg.Search(String(str));
bnewwindow = gg.OpenNewWindow();
} catch (ex) { }

if(bnewwindow)
window.open(url);
else
parentwin.navigate(url);
</script>
</html>


And here is the REG info:

- - -
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\&Dictionary]
"Contexts"=hex:10,00,00,00
@="C:\\WINDOWS\\WEB\\dictionary.htm"
- - -


So for Encarta, use this

<html>
<script language="JavaScript" defer>
var parentwin = external.menuArguments;
var doc = parentwin.document;
var sel = doc.selection;
var rng = sel.createRange();
var strhtml = new String(rng.htmlText);
var str = strhtml.replace(/<[^>]*>/g," ");
str = str.replace(/\s+/g, " ");
str = str.replace(/^\s*/,"");
str = str.replace(/\s*$/,"");
if (str.indexOf(" ") != -1)
str = '"' + str + '"';
var bnewwindow = external.menuArguments.event.shiftKey;
var url = "http://encarta.msn.com/dictionary_/"; + escape(str) + ".html";
try {
url = gg.Search(String(str));
bnewwindow = gg.OpenNewWindow();
} catch (ex) { }
if(bnewwindow)
window.open(url);
else
parentwin.navigate(url);
</script>
</html>

Save as c:\windows\web\encarta.htm

And the REG file for this.

- - -
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\Encarta]
"Contexts"=hex:10,00,00,00
@="C:\\WINDOWS\\WEB\\encarta.htm"

- - -


--
Regards,

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


"Antonio" <Antonio@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:8B3403AB-69CE-4036-AFB0-F838B513E395@xxxxxxxxxxxxxxxx
Hi Alan,

Thank you for the link.

That is exactly what I needed.

I am familiar with VB Express and VBA. Can the script be in any of those two
languages?

Thanks,

Antonio


"Alan Edwards" wrote:

Try here (or around this area)

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 Mon, 22 May 2006 03:25:02 -0700, in
microsoft.public.windows.inetexplorer.ie6.setup, Antonio
<Antonio@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

Hi Don,

Thank you for your suggestion.

It helps and I have downloaded the dictionary.com tool bar.

I still like Encarta better, amont other things because it has free
pronunciation sample which dictionary.com does not.

Is it possible to program IE myself, or change the registry, to do it?

Regards,

Antonio

"Don Varnau" wrote:

Hi,
I don't know of a tool which would use the Encarta dictionary. But,
both
www.dictionary.com and www.m-w.com offer such a tool.
http://dictionary.reference.com/tools/
http://www.m-w.com/downloads.htm

Hope this helps,
Don
[MS MVP- IE]

"Antonio" <Antonio[at]discussions.microsoft.com> wrote in message
news:6E3B2C38-DBC1-4148-855C-800A2D33ACC2@xxxxxxxxxxxxxxxx
I would like to have an option to open the Microsoft Encarta
dictionary
definition of a word when I right click on it on any web page.

Can it be done?

Thanks,

Antonio






.



Relevant Pages

  • Re: Need list of running Apps
    ... This unit wraps some windows API calls, ... function Get: THandle; ... {TApiWindow is a wrapper around a windows handle to represent any ...
    (comp.lang.pascal.delphi.misc)
  • Strange Behavior of Show Modal
    ... > Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, ...
    (borland.public.delphi.ide)
  • Re: Performance confusion
    ... Fisher-Yates shuffle, as implemented by Durstenfeld and given by Knuth. ... var a, b = '0123456789'.split; ... a Swap function. ... shuffle at the Windows Command Prompt using WSCRIPT or CSCRIPT. ...
    (comp.lang.javascript)
  • Re: Attach event/function to links within span tag
    ... > Just another way as a suggestion (by using a separate tag for ... > var hColor = '#FF0000'; ... > var lnk = document.getElementsByTagName; ... this is flawed as Netscape 6+ on Windows supports ActiveXObject ...
    (comp.lang.javascript)
  • Re: deleting variables set with SET?
    ... Microsoft MVP [Windows] ... "yawnmoth" wrote: ... | How can I delete "var"? ...
    (microsoft.public.windowsxp.general)