Reference anchor in CHM from external app
Moderators: Alexander Halser, Tim Green
-
- Posts: 35
- Joined: Mon Feb 13, 2017 4:25 pm
Reference anchor in CHM from external app
Hi, Where have compiled our chm file and found that we were missing some links from within our app to anchors defined within the chm file. We have defined the link as follows: umerrormessage.htm#connect_error_message_detail. Are we missing something? Thank you.
- Tim Green
- Site Admin
- Posts: 23189
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Re: Reference anchor in CHM from external app
Hi Erich,
That would be the correct basic syntax since the files inside the CHM are normal HTML files served up with the WebView instance of Internet Explorer. (The CHM viewer is basically a (very) old version Internet Explorer with a different interface.)
However, you also need to know how to make the calls in your specific programming environment. Although all CHM calls from applications are made via the HTML Help API (documented in the help file of the MS HTML Help Workshop compiler package), how you make calls to CHM files depends on the programming language you are using. You can find tutorials for interfacing with CHM files for most current programming languages here:
http://www.helpandmanual.com/support_tutorials.html
That would be the correct basic syntax since the files inside the CHM are normal HTML files served up with the WebView instance of Internet Explorer. (The CHM viewer is basically a (very) old version Internet Explorer with a different interface.)
However, you also need to know how to make the calls in your specific programming environment. Although all CHM calls from applications are made via the HTML Help API (documented in the help file of the MS HTML Help Workshop compiler package), how you make calls to CHM files depends on the programming language you are using. You can find tutorials for interfacing with CHM files for most current programming languages here:
http://www.helpandmanual.com/support_tutorials.html
Regards,
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Re: Reference anchor in CHM from external app
The syntax to open a CHM file from another CHM file is the following:
Where:
hh.exe: CHM viewer, used on the File name field on File Link tab of the Edit Hyperlink window on H&M.
filename.chm: The CHM file to open. It must be on the same folder, there is no room for relative or absolute paths.
topic.htm|topic.html: The name of a topic to open, usually the same as the topic ID, but all in lowercase.
anchor: An anchor on the topic if you want to go to a specific position on the topic.
The part of this syntax beginning with ms-its goes on the Execution parameters field on File Link tab of the Edit Hyperlink window on H&M.
The file extension (.htm or .html) is configured on the Configuration - Publishing Options - Microsoft HTML Help - HTML Export Options - Extension for HTML files option.
Code: Select all
hh.exe ms-its:<filename.chm>::/<topic.htm|topic.html>#<anchor>
hh.exe: CHM viewer, used on the File name field on File Link tab of the Edit Hyperlink window on H&M.
filename.chm: The CHM file to open. It must be on the same folder, there is no room for relative or absolute paths.
topic.htm|topic.html: The name of a topic to open, usually the same as the topic ID, but all in lowercase.
anchor: An anchor on the topic if you want to go to a specific position on the topic.
The part of this syntax beginning with ms-its goes on the Execution parameters field on File Link tab of the Edit Hyperlink window on H&M.
The file extension (.htm or .html) is configured on the Configuration - Publishing Options - Microsoft HTML Help - HTML Export Options - Extension for HTML files option.
- Tim Green
- Site Admin
- Posts: 23189
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Re: Reference anchor in CHM from external app
Hi Julio,
That's all correct, but the syntax for calling topics and anchors in a CHM from applications is a different subject, and is very different from one programming system to another. That's why it's important to reference the tutorials for the language being used for this.
That's all correct, but the syntax for calling topics and anchors in a CHM from applications is a different subject, and is very different from one programming system to another. That's why it's important to reference the tutorials for the language being used for this.
Regards,
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.