In Line.
Jack said:
Thanks for the info.
I cannot find answer to these questions:
1.
Do I need an icon placed on IE taskbar (to do what I want to do)?
No, an icon is not mandatory, you can add an entry in the Tools dropdown menu.
However, adding an icon to the toolbar is a simple task that is done
by the installer when you install your program / BHO, and having a visible
icon is much easier for the user to see / find / click.
I use Inno Setup as my installer.
2.
Is that a requirement for BHO?
No, the answer to 1 applies.
3.
Why there is that convulsing method of creating GUIDS etc, instead of just making a simple entry into
registry?
Because that's the only way Internet Explorer will honor the additions to it's
menus and toolbar.
If you have Visual Studio installed along with your VB 5, you have a program that will create your GUID
for you
It's called GUIDGEN.EXE and lives in C:\Program Files\Microsoft Visual Studio\COMMON\Tools
4.
Creating button running a script
I "think" it could be done with javascript.
remember the old IE 5 web accessories tool?
It had functions called from the IE context menu which
were nothing more than javascript in a html file. One of them
allowed you to highlight text in a page and since I still have it / use it
so here is the script in it's entirety. It's contained in a file named highlight.htm
which lives in C:\WINDOWS\Web:
<HTML>
<script LANGUAGE="JavaScript" type="text/javascript" defer>
var parentwin = external.menuArguments;
var doc = parentwin.document;
var sel = doc.selection;
var rng = sel.createRange();
var str = new String(rng.text);
rng.execCommand("BackColor",0,"YELLOW");
</script>
</HTML>
and is called by the entry in this registry key:
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt
the entry is simply: C:\WINDOWS\WEB\highlight.htm
set as the default value.
This method does not require a GUID
is it possible to make IE to run that script automatically (without clicking on that button)?
Not a script that's external to the website for the page that's being loaded.
Meaning a script that's contained on the users system
IE can only run a script that's contained or referenced within the document that's loaded,
being loaded.
Unless........ it's added as a valid addin in IEs addin list.
Something else to keep in mind, all bets are off for something like
this working in Vista.
--
Steve Easton
Microsoft MVP FrontPage
FP Cleaner
http://www.95isalive.com/fixes/fpclean.htm
Hit Me FP
http://www.95isalive.com/fixes/HitMeFP.htm