2014-12-05

Hi Ian,

You are on the right track. You will need to use conditional text tags for the two versions of your links (ideally in two separate blocks, then you only need one tag pair for each).

The important thing to know about links from CHM files, is that they are restricted by bugs in the Microsoft CHM viewer. In a normal CHM, links to external files will only work if the files are in the same folder as the CHM. In addition to this, it will normally only find those files if the folder containing the CHMs is activated as the current folder by your application -- this generally means that you have to have the CHMs stored in the same folder as your application, as its folder will normally be the current folder.

You can solve the first problem by using a CHM skin from Premium Pack 2 for HM6, which includes scripting that gets around the first bug and allows you to use relative links to external files. You can mitigate the second problem by registering your CHM in Windows as part of your installation process, in HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\HTML Help. If you look there with RegEdit you'll see plenty of examples of the keys you need to set and how to set them.

Links to external CHM files:

For these links you need to use the Microsoft ms-its protocol header for CHM file references. Select the Link tool in Write > Insert and choose the File Link option. In the "File name:" field enter:

Code:

hh.exe

as the file to link to (this is the MS CHM help viewer). Then enter your CHM file and topic details in the "Execution parameters: field", using the following syntax:

Code:

ms-its:helpfile.chm::/topicname.htm#anchor

Where "helpfile.chm" is the name of your help file "topicfile.htm" is the topic ID of the topic you want to link to + ".htm" (all lower case letters!) and "anchor" is the optional ID of an anchor on the page you want to link to. For example:

Code:

ms-its:myhelp.chm::/introduction.htm#note3

To call topics via a context ID use the syntax:

Code:

hh.exe -mapid 12030 ms-its:helpfile.chm

where you would replace the 12030 with the context ID of the topic or anchor you want to display.

Links to PDF files:

Basically, you just need to use file links for linking to PDF. See the instructions for creating links to named destinations in PDF in this help topic:

http://helpandmanual.com/help/index.htm ... ations.htm

Statistics: Posted by Tim Green — Fri Dec 05, 2014 7:58 am

Show more