CHM transform and context-sensitive help

Miriam
Posts: 14
Joined: Fri Nov 01, 2013 8:16 pm

CHM transform and context-sensitive help

Post by Miriam » Sat Dec 14, 2013 12:08 am

I'm trying to figure out the a way to create CHM output that includes context-sensitivity. I thought I could point the args.htmlhelp.includefile parameter to my .h file, but that didn't work. My CHM still didn't have pass the context-sensitive test.

sorin_ristache
Posts: 4144
Joined: Fri Mar 28, 2003 2:12 pm

Re: CHM transform and context-sensitive help

Post by sorin_ristache » Mon Dec 16, 2013 5:23 pm

Hello,

You can build a map with all the mappings [application context, CHM help topic] that you can use at runtime to know what help topic to open when the user activates the context sensitive shortcut (the F1 key, a Help menu item, etc). You can try to build this map automatically when you build your application from a command line.

When the user activates the context-sensitive help action (for example the F1 key) the application can look up the exact address of the HTML topic for the current context (a dialog box, an editor panel, etc) and open the CHM file at that topic with an external process that starts the CHM file like this:

Code: Select all

helpViewer.exe  UUID_value  help.chm  path_to_HTML_topic_file
where UUID_value is a random unique universal identifier for avoiding conflicts with other helpViewr.exe processes that might be running at the same time and path_to_HTML_topic_file is the path to the topic file inside the CHM file, for example: topics\\main-editor.html.


Regards,
Sorin

Miriam
Posts: 14
Joined: Fri Nov 01, 2013 8:16 pm

Re: CHM transform and context-sensitive help

Post by Miriam » Tue Dec 17, 2013 9:09 pm

Hi Sorin,

I think I may have phrased my question poorly because this answer seems broader than I need. I have a map file (.h) already. I've tested my map file's validity by using RoboHelp to create a CHM, and it works. But this adds an extra step and an extra tool to the workflow, and I'm trying to eliminate that. I would like to be able to generate a CHM directly out of oXygen that would include my context-sensitive help hooks.

I though I could point the args.htmlhelp.includefile parameter in the CHM transform settings to my .h file in order to do this, but it didn't work. Is there a different parameter that I should use instead? Is this simply something I cannot do directly in oXygen?

sorin_ristache
Posts: 4144
Joined: Fri Mar 28, 2003 2:12 pm

Re: CHM transform and context-sensitive help

Post by sorin_ristache » Wed Dec 18, 2013 3:18 pm

Hi,
Miriam wrote:I have a map file (.h) already.
What does the .h file contain? An example of mapping from this file?
Miriam wrote:I've tested my map file's validity by using RoboHelp to create a CHM, and it works. But this adds an extra step and an extra tool to the workflow, and I'm trying to eliminate that. I would like to be able to generate a CHM directly out of oXygen that would include my context-sensitive help hooks.
Does this validity check make sure that there are context-sensitive help hooks inside the CHM file? What does this validity check do?
Miriam wrote:I though I could point the args.htmlhelp.includefile parameter in the CHM transform settings to my .h file in order to do this, but it didn't work. Is there a different parameter that I should use instead? Is this simply something I cannot do directly in oXygen?
Sorry, context-sensitive CHM help is not something that can be done in one step, in Oxygen or in other tool. I believe it strongly depends on the application that needs to invoke the CHM in a context sensitive way. This is why I suggested building the map automatically, at application build time, with all the possible contexts and the corresponding specific help topics, each topic identified by an ID, possibly the id attribute of the root element of the XML topic file from which the CHM output is created.


Regards,
Sorin

Post Reply