Show Sitemap ..Help2HTMLHelpWinHelp

HTMLHelp - Linking

HTMLHelp 1.x hat nicht die Fähigkeit, über http komprimierte Hilfe an einen Browser zu übergeben. Sie können zu einer CHM auf dem lokalen Laufwerk des Benutzers verlinken und Sie können auf eine CHM zum Herunterladen verlinken, aber das ist soweit auch alles was geht. Dieses Merkmal war versuchsweise für zukünftige Versionen geplant, da es dafür viele Anforderungen gegeben hat.

Es ist anzunehmen, dass diese Funktionalität wegen der Entwicklung von Windows Vista AP Help nicht mehr freigegeben wird.

Die Fähigkeit in eine ITS Datei (CHM) zu schauen ist etwas sehr Microsoft Internet Explorer (IE) spezifisches. Nur der IE kann den folgenden lokalen Pfad laden:

its:C:\WINDOWS\Help\mspaint.chm::/paint_airbrush.htm

Kopieren Sie den obigen und ändern Sie auf ihren %WINDIR% Pfad zum ausprobieren.

Java Script

Link to Test

Dies schlägt fehl unter SP2 * schlägt fehl *

<a href="JavaScript:showHelp('ms-its:mspaint.chm::/paint_brush.htm')">Help</a>

 

Link to a CHM file - Page pulled into Browser:

Full path to CHM - ** OK ** Dies schlägt fehl unter SP2 * schlägt fehl *
its:http://www.help-info.de/files_download/CHM-example.chm::/index.htm

BUT... This fails from inside a CHM file.

Link to a topic in a CHM on the web - ** OK ** Dies schlägt fehl unter SP2 * schlägt fehl *
<A HREF="its:http://www.help-info.de/files_download/CHM-example.chm::/Garden/flowers.htm">Link to a topic in a .chm</a>
Link to a topic in a .chm

Standard Link zu einer CHM Datei - Download Dialog

Ohne das ms-its: Präfix versucht Ihr Browser die CHM-Datei mit der Standarddialog Abfrage "Öffnen oder Sichern" herunterzuladen.

Gibt es dennoch eine Möglichkeit den Öffnen-/Speichern-Dialog zu vermeiden?

Nicht wirklich ... CHM's wurden nicht dafür entworfen, um über das Netz per http geöffnet zu werden. Stattdessen sollten Sie eine der verfügbaren "Web-Hilfe" Anwendungen verwenden. Microsoft hat ein kostenloses JavaScript bereitgestellt, aber es ist nicht sehr gut und unterstützt nicht alle Merkmale von CHM Dateien. Die mit professionellen Autorensystem-Hilfsprogrammen (zum Beispiel RoboHelp) erstellten sind viel besser.

Es gibt einen Umweg dies zu tun - aber es gibt Beschränkungen und keine Garantie, dass es immer noch funktioniert oder zukünftig noch arbeitet. Zwecks weiterer Informationen sehen Sie:

www.logicsmith.com/Dateien/chmincab.zip

Linking to PDF

1) Use following syntax in your HHC file:
///
<LI><OBJECT type="text/sitemap">
<param name="Name" value="Link PDF from CHM">
<param name="Local"
value="http://www.help-info.de/files_download/example.pdf">
<param name="WindowName" value="main">
</OBJECT>
\\\

2) Use a shortcut control like the one below to open the PDF in the
associated application (e.g., Acrobat or the Acrobat Reader).

<object classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<param name="Command" value="ShortCut">
<param name="Button" value="Text:Click Here">
<param name="Item1" value=",sample.pdf,">
</object>

3)
The attached tutorial offers a method of linking to a PDF from a CHM file.
It explains how to effectively "SHELL" a Windows program to which you only
know the RELATIVE path from your CHM file

This is an FAQ that I see regularly, but as yet I have not seen my method
offered as a solution. The method uses a PDF as the example, but it can work
just as well for other types of shortcut.

I will be cross-posting this tutorial to a number of HTMLHelp groups.

Comments appreciated.

--------------------------------------------------------------------
Jeff Hall MSc ARICS, Eon Commerce Ltd.
Microsoft HTML Help MVP
http://www.easyhtmlhelp.com

EasyHTMLHelp: CHM file Editor for MS Word 97/2000
Latest Version = 1.1 Build 26 - March 26 2001

If you would like to join (or unsubscribe) the automated
mailing list then go to http://ehtmlhelp.listbot.com/
--------------------------------------------------------------------


From: Jeff Hall HTMLHelp MVP http://www.easyhtmlhelp.com
Subject: Linking to an external PDF file from a CHM


Problem:

The HTMLHelp workshop allows you to create an "ActiveX Shortcut" command
that enables you to link from a CHM file to an EXTERNAL file such as a PDF.

Normally you would place the PDF in the same folder location as the CHM file,
or alternatively in a known RELATIVE path.

However, the PDF shortcut does not always display: sometimes generating a
"file not found" message.

Cause:

The CHM file assumes the current DEFAULT directory for shortcuts.
This may be different to the location of the CHM file folder.

Solution:

It is possible to read the CHM location from any page inside a CHM file.
By using Javascript to read this location and write the shortcut, the external
file can be called using its ABSOLUTE path.

This is a robust method of solving this problem.

-->

<HTML>
<TITLE>EasyHTMLHelp.com - robust method of calling an external PDF from a
CHM</TITLE>
<HEAD>
</HEAD>
<BODY>


<SCRIPT>
//Create the chmfile object for this HTML page
var chmfile = new Object();
chmfile.fullname = "";
chmfile.name = "";
chmfile.path = "";
chmfile.page = "";
getchmfile();

//Get the path and name of the CHM file and assign object values
function getchmfile(){
var ra, sl, a, X, Y, Z;
ra = /:/;
a = location.href.search(ra);
sl = "::";
Y = location.href.lastIndexOf(sl);
if (a == 4) { // file: or http:
Y = location.href.lastIndexOf("/");
chmfile.page = unescape(location.href.substring(Y+1));
if(location.href.substring(0,4) == "file"){
chmfile.path = unescape(location.href.substring(8, Y+1));
}
}
else {
if (a == 2) X = 14; // mk:@MSITStore:
if (a == 7) X = 7; // ms-its:
chmfile.fullname = unescape(location.href.substring(X, Y));
Z = chmfile.fullname.lastIndexOf("\\");
chmfile.path = unescape(chmfile.fullname.substring(0, Z+1));
chmfile.name = unescape(chmfile.fullname.substring(Z+1));
chmfile.page = unescape(location.href.substring(Y+3));
}
/*
alert(location.href+"\n\n"+"fullname="+chmfile.fullname+"\n"+"path="+chmfile.pat
h+"\n"+"name="+chmfile.name+"\n"+"page="+chmfile.page);
*/

}


//Write a Shortcut Button in JavaScript
var relativepath="pdffiles\\mypdf.PDF";

document.write('<OBJECT id=ShortCutButton type="application/x-oleobject"');
document.write(' classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"');
document.write(' codebase="hhctrl.ocx"');
document.write(' >');
document.write(' <PARAM name="Command" value="ShortCut">');
document.write(' <PARAM name="Button" value="Text:Click This Button">');
document.write(' <PARAM name="Item1"
value=",'+chmfile.path+relativepath+',">');
document.write('</OBJECT>');


//Write a Hidden Shortcut Link Object in JavaScript
var relativepath2="pdffiles\\myotherpdf.PDF";

document.write('<OBJECT id=ShortCutLink type="application/x-oleobject"');
document.write(' classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"');
document.write(' codebase="hhctrl.ocx"');
document.write(' >');
document.write(' <PARAM name="Command" value="ShortCut">');
document.write(' <PARAM name="Item1"
value=",'+chmfile.path+relativepath2+',">');
document.write('</OBJECT>');

</SCRIPT>

<BR><BR>
<A HREF="javascript:ShortCutLink.Click()">Text Link to PDF File</A>

</BODY>
</HTML>

 

 

 

Top ...