Open CHM File Once

This is the place to discuss Help & Manual 4 issues. Please don't post questions on any other versions here!

Moderators: Alexander Halser, Tim Green

Post Reply
rfossella
Posts: 23
Joined: Tue Sep 18, 2007 9:50 pm

Open CHM File Once

Unread post by rfossella »

Hello,

I've created/compiled a CHM file from H&M. I open the file using HH.exe - e.g. hh.exe MyHelp.chm. However, each time I start the help file (on a different topic) it opens a new instance of the help file.

I saw something on the MS site but wondered if there were any other options or work-arounds for opening a single instance of a CHM file.

Thanks.
Robert
User avatar
Winsteps
Posts: 443
Joined: Wed Aug 29, 2007 7:34 am

Re: Open CHM File Once

Unread post by Winsteps »

Robert, how about using KeyHH.exe - http://www.keyworks.net/ ? That works fine for me.
rfossella
Posts: 23
Joined: Tue Sep 18, 2007 9:50 pm

Re: Open CHM File Once

Unread post by rfossella »

Winsteps,

Thank you so much for the heads up on this. I will give it a try tomorrow and write back to the forum.

Robert
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Open CHM File Once

Unread post by Tim Green »

Hi Robert,
I've created/compiled a CHM file from H&M. I open the file using HH.exe - e.g. hh.exe MyHelp.chm. However, each time I start the help file (on a different topic) it opens a new instance of the help file.
Where are you calling the file from, and how (i.e. programming language, application type)? Making multiple calls to the same CHM is absolutely standard procedure and is fully supported by the HTML Help API. It's just a question of what language you are using and the individual implementation of the calls to the API for the specific language.
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.
rfossella
Posts: 23
Joined: Tue Sep 18, 2007 9:50 pm

Re: Open CHM File Once

Unread post by rfossella »

Hi Tim,

I am using the following syntax to open the help file
hh "C:\MyManuals\Help.chm"

I always get multiple instances of the Help file regardless of whether I start from a DOS command line or within my Smalltalk or Java application (using same syntax).

I checked for switches but don't see anything relevant. Am I missing something?

Thanks.
Robert
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Open CHM File Once

Unread post by Tim Green »

Hi Robert,
I checked for switches but don't see anything relevant. Am I missing something?
When you do that you are just calling the help viewer again and again from the command line, you're not using the HTML Help API which is what you need to access the CHM once it is open. You need to check whether your flavors of Java and Smalltalk support calls to the HTML Help API. This API is documented in detail in the help file of Microsoft HTML Help Workshop, which is the compiler package you installed to be able to generate CHMs.

Actually, however, since both Java and Smalltalk are cross-platform, it would probably be better to use WebHelp rather than HTML help. WebHelp displays in any browser on any platform and you can make context-sensitive calls to it with simple URLs, using this syntax:

index.html?topicid.htm#anchorid

Where index.html is your main index file, topicid.htm is the topic ID of the topic in all lower case + ".htm" and anchorid is an optional named anchor in the target topic that you want to jump to.
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.
rfossella
Posts: 23
Joined: Tue Sep 18, 2007 9:50 pm

Re: Open CHM File Once

Unread post by rfossella »

Thank you, Tim. I will see if I have access to this API.

As far as using WebHelp instead of HTML, I've been trying to get my company to do this as it would definitely be an easier implementation. However, there is a requirement to have a single, self-contained help file, as opposed to the 100's of files that get created for WebHelp.

Thanks again.

Robert
rfossella
Posts: 23
Joined: Tue Sep 18, 2007 9:50 pm

Re: Open CHM File Once

Unread post by rfossella »

Winsteps,

Any chance you have, or know where I can locate, the command line switches for KeyHH.exe?

I've tried to use the Help API but have run into issues so I'd like to give it that program shot.

Thanks.
Robert
User avatar
Winsteps
Posts: 443
Joined: Wed Aug 29, 2007 7:34 am

Re: Open CHM File Once

Unread post by Winsteps »

Robert:

This shows the KeyHH documentation: http://forum.hippoedit.com/index.php?ac ... 0;attach=8
rfossella
Posts: 23
Joined: Tue Sep 18, 2007 9:50 pm

Re: Open CHM File Once

Unread post by rfossella »

Perfect. Thank you very much!

Robert
rfossella
Posts: 23
Joined: Tue Sep 18, 2007 9:50 pm

Re: Open CHM File Once

Unread post by rfossella »

Hi Tim,

I know this thread is two years old but I have a follow-up question. My previous post stated I was trying to resolve the issue of multiple instances of Windows help opening. You accurately wrote is was because I was calling hh.exe multiple times. I started using KeyHH.exe as my work-around instead of HTML Help API. Well, 64-bit Windows 7 doesn't like that program :cry: , so I have to use the API. I'm trying to determine the DLL that is associated with executing the Help Window. I have references: http://msdn.microsoft.com/en-us/library ... s.85).aspx and http://en.wikibooks.org/wiki/Windows_Pr ... chitecture.

Would you happen to know the correct/exact dll files I need?

Thanks.
Robert
User avatar
Winsteps
Posts: 443
Joined: Wed Aug 29, 2007 7:34 am

Re: Open CHM File Once

Unread post by Winsteps »

Robert, you write "Well, 64-bit Windows 7 doesn't like that program"

That is strange. No problems with Help displayed through KeyHH.exe (version 1, 1, 9145,00, dated 6/16/2007) have been reported by my thousands of end-users on Windows7 and Windows8 64-bit. This is probably another of those nasty UAC/installation glitches. Please make sure that KeyHH.exe is installed in Administrator mode, but with permission for everyone to execute it.

If you would like that version of KeyHH.exe, it is in http://www.winsteps.com/a/keyhh.zip
User avatar
Tim Green
Site Admin
Posts: 23156
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Open CHM File Once

Unread post by Tim Green »

Hi Robert,

I can't really comment on KeyHelp because I don't have all that much experience with it, especially in the last few years. However, one of the best sources of information on HH/CHM is Rob Chandler's HelpWare site, which has recently renamed itself HelpWare Group. See this page on his excellent Wiki for details on the components of the HH runtimes and much more besides:

http://kb.helpwaregroup.com/ms-html-help/hh_info
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.
rfossella
Posts: 23
Joined: Tue Sep 18, 2007 9:50 pm

Re: Open CHM File Once

Unread post by rfossella »

Thank you, Tim. The link you provided will be very helpful!

Much appreciated.
Robert
Post Reply