10 Replies Latest reply on Oct 1, 2012 2:52 PM by RicaJean03

    Opening specific topics in merged Help file

    mike_genthner
      I have a modular Help file problem that I'm hoping someone can help with.

      We are developing a window for our software product that will allow users looking for help on a specific task, to enter a string into a text box. As the user string is typed into the box, the software returns a list of possibilities, from which the user is then expected to choose a task. When the task is chosen, a string associated with that task is passed back to the software. In theory, the software opens the Help file and the topic associated with the task is simultaneously displayed.

      The complicating factor is that the target topic is in a merged CHM file under the master CHM. Ideally, when we pass a string to locate a specific topic in this merged file, we would want to open the master CHM and have (1) the topic located in the TOC pane to the left and (2) the topic display in the Topic pane to the right. Unfortunately, we haven't been able to make it work quite right. The correct topic is located in the TOC pane, but the right-hand pane displays a "this program cannot display the webpage" message. What's funny is that if I simply click on the topic in the TOC pane, the right pane will display the correct topic. In other words, we are finding the topic in the TOC, but we just aren't displaying it.

      Obviously, we are not passing the correct string to the software but I don’t seem to be able to hit upon the right syntax. So, to summarize what I want to do is to have the Master file open to a specific topic in the Merged file called, for instance, "My_Topic.htm." Thus, I have tried…

      Master.CHM::/My_Topic.htm
      Master.CHM::/Merged.CHM/My_Topic.htm

      …but neither has worked.

      I should mention that we have not renamed any CHM files using Win Explorer, and we have not specified a binary TOC. Also, both CHM files are local.

      Any advice would be greatly appreciated.
        • 1. Re: Opening specific topics in merged Help file
          Level 2
          I don't have a lot of experience with merged CHM files but this might get you started.

          If you call the just the merged file : "Merged.chm::/My_Topic.htm" it should open. Each merged topic would need to have the master TOC for the user to continue navigating.

          John
          • 2. Re: Opening specific topics in merged Help file
            Phil_Wells Level 1
            Hi Mike,

            I've just experienced a similar problem - read the "Mutiliple CHM Table of Contents" topic for the full exchange.

            What became apparent due to input from an experienced user (RoboWiz) is that if you recompile a merged product, RoboHelp does not overwrite the older sub-projects in the output folder for the master. If you delete them from the output folder and recompile you might get better results as the output folder will now contain the latest versions of the sub modules.

            What might be happening to you is that the master .chm file is trying to open topics that are not present in the older version of the sub-projects, hence the "cannot display webpage" message.

            (You can link to any topic from the master by using the 'Hyperlink > Link to Remote Topic' option from the toolbar once you have the sub-module imported into your project).
            • 3. Re: Opening specific topics in merged Help file
              AuthorAnne
              Or you could try:

              Master.CHM::/Merged.CHM::/My_Topic.htm

              You need to add the two colons after the slave chm file name.

              Anne
              • 4. Opening specific topics in merged Help file
                mike_genthner Level 1
                John, Phil, and Anne, thanks much for your help.

                Anne's suggestion -- passing the string Master.CHM::/Merged.CHM::/My_Topic.htm -- almost works.

                It's odd: the developer's code invokes the Master file and -- as originally coded -- passes the name of the topic without naming the merged file. This results in the master file opening (good), the topic selected in the TOC pane (good), but the content pane shows the "cannot display" message (bad). If I modify this code and pass the full path to the topic as Anne suggested, then the master file opens (good), the content pane displays the correct topic (good), but now the TOC pane is "dead" (bad).

                I (1) fiddled with deleting the merged files in the output folder before generating the master, I (2) specified that the merged file use the TOC of the master and (3), I tried inserting a line at the head of the merged file's HHC file that specified the full path to the top-most topic in the merged file (Master.CHM::/Merged.CHM::/My_Topic.htm), but nothing works and I'm to the point of flailing in the dark.

                So, does it appear that I have a TOC synchronization problem?

                TIA,
                Mike
                • 5. Re: Opening specific topics in merged Help file
                  mike_genthner Level 1
                  I'll restate my problem on the off chance that it will become clearer:

                  I have a Master.chm file and a Merged.chm file. The Merged.chm file contains My_Topic.htm.

                  At the Command Prompt, I type...

                  hh Master.chm::/Merged.chm::/My_Topic.htm

                  ... and the Help system opens to display My_Topic.htm in the right-hand (content) pane but the left-hand pane TOC does not synchronize to show My_Topic in the TOC tree (even though the "Auto-synchronize TOC" window property is selected for both projects).

                  Alternately, at the Command Prompt, I type...

                  hh Master.chm::/My_Topic.htm

                  ...and this time, the Help system opens with My_Topic selected in the left-hand TOC pane but the right-hand (Content) pane displays "This program cannot display the webpage."

                  So, it seems I can have My_Topic display in the right-hand pane or I can have the topic selected properly in the TOC pane, but I can't get both. Weird.

                  Anyone?

                  TIA

                  -- Mike
                  • 6. Re: Opening specific topics in merged Help file
                    Level 2
                    Mike,

                    I'm curious to what you get when you do hh Merged.chm::/My_Topic.htm as I suggested earlier. This works for me but I do remember needing to tweak the slave CHM TOCs a little. I did this a long time ago and it is the only time I have ever worked with multiple CHMs for an application.

                    John
                    • 7. Re: Opening specific topics in merged Help file
                      Phil_Wells Level 1
                      Hi Mike,

                      Based on what I can work out (and I could be wrong) the completed project, merged files and all, is in the !SSL!/HTML Help output folder of the master project. When you compile the master project takes the links, subsiduary merged files, etc, that it knows about relative to the files in the Master Help files main directory, (i.e. the baggage files that the project knows about after you have imported the subsiduary files into the project) and exports a compiled .chm master file into the !SSL!/HTML Help output folder of the master project that contains details of the links and subsiduary files.

                      What it doesn't do is export any subsiduary files from the Master Help files subdirectory if there are any there in the first place. This means you can get outdated subsiduary .chm files there.

                      This means RoboHelp puts in the correct links in your master project (cos the right filres are in your baggage files) and writes a master project .chm file to the output ditrectory. If however, your subsiduary project .chm file is already in your output directory then this will not be updated and your master .chm file will contain links to topics that might not be in the version of the subsiduary .chm file in the output directory - hence the message saying 'can't display the web page'.

                      What I've (recently) learned to do is:

                      (1) Produce and generate master project and sub projects into the default !SSL!/HTML Help sub directories for each project. When I know each stand alone section of the project is working OK I:

                      (2) Import the subsiduary projects into the master so there is a file of the correct name in the master. (In the bagge files section).

                      [I re-import only if i've changed the structure of the subsiduary projects such the master project references topics that no longer exist or needs to reference newly created topics].

                      (3) Set up another single source layout in the subsiduary projects that writes the latest version of the .chm file directly into the required output directory of the the master project.

                      (Because Robohelp doesn't refresh the files in the output drectory of the master project if they're already present this means each time I recompile the subsiduary projects the lastest version goes into the output directory of the master project - this saves reimporting them into the master and deleting the contents of the master's output directory).

                      (If I batch generate I can write an updated copy into the sub project's default !SSL!/HTML Help at the same time - so if I want to look at just the output of the sub project I can always do that as well).

                      (4) Everytime I generate the master project it sends a compiled master.chm file to the specified output directory, but doesn't overwrite the subsiduary .chm files in that output directory. However, as I've set up the subsiduary projects to write their latest versions of their files to that directory every time I compile it always has the latest versions of those files for when you despatch the project.

                      This means everytime you recompile the master it knows the right file names, links, etc, for the subsiduary projects and each time you recompile the subsiduary projects the latest version goes into the master projects output directory.

                      If you don't do this (or sometning like) your master and sub projects will get out of sync and you'll end up with problems referencing topics in the subsiduary projects.

                      (If you've already understood this, sorry for going over old ground).
                      • 8. Opening specific topics in merged Help file
                        AuthorAnne Level 1
                        Hi all,

                        There is a known problem with TOC synchronization when you open a merged help file at a topic in the slave project, using the method I suggested.

                        The solution was suggested by someone else in these forums some time ago, and I don't have time right now to search for it. However, here are the notes I made at the time:

                        To fix the problem you have to edit the contents of the slave project.hhc file. The first item in the unordered list contains the line:

                        <param name="Local" value=" slave.chm::/ topic.htm">

                        Change this to:

                        <param name="Local" value=" master.chm::/ slave.chm::/ topic.htm">

                        In other words, the name of the master help file needs to be prefixed to the slave file name.

                        I have a vague memory that this causes problems if you're using context-sensitive help, but I wasn't, so it didn't matter.

                        Hope this helps.

                        Anne
                        • 9. Re: Opening specific topics in merged Help file
                          mike_genthner Level 1
                          Thank you much John, Phil and Anne. I think I'm going to have to give up on this one. I did as each of you suggested but it seems to make no difference. If I call the topic using...

                          hh Master.chm::/My_topic.htm

                          ...I don't get the topic to display (even though the topic found and highlighted in the TOC). If I call the topic using...

                          hh Master.chm::/Slave.chm::/My_Topic

                          ...the topic displays but the TOC doesn't sync (Even clicking the "Locate" button on the window toolbar does no good).

                          I even made a couple of small test projects, one master and one slave, just so that I could make sure that there wasn't something about my projects that was causing the problem, but there was no change. I even tried to get the Slave.chm to use the TOC of the Master.chm, but to no avail.

                          BTW, Anne, I don't know whether this is a RoboHelp peculiarity or not, but the first two lines in the unordered list in the Slave.hhc file are...

                          <param name="Name" value="My Topic">
                          <param name="Local" value="My_Topic.htm">

                          No CHM defined. I did change the second line to read...

                          <param name="Local" value=" Master.chm::/ Slave.chm::/My_Topic.htm">

                          ...but that had no effect.

                          Thank you all, again.

                          -- Mike
                          • 10. Re: Opening specific topics in merged Help file
                            RicaJean03

                            I know this post is old, but I had searched for solutions to the exact same problem for a day now and finally figured out the problem.

                             

                            I tried what was suggested, along with several other things. What worked for me (Robohelp 8.02, generating a Microsoft HTML Help .chm) was to go into the slave chm and change the table of contents so that the topics were remote topics.

                             

                            topic1.htm became master.chm::/slave.chm::/topic1.htm

                            and so on

                             

                            The individual chm file will appear to not work in the newly generated chm if the master.chm is not in the same folder. It will work fine though when all the master and slave .chm files are in the same folder.

                             

                            then in the command prompt, i entered hh.exe ms-its:pathtochm\master.chm::/slave.chm::/overview.htm and it navigated to the right topic AND displayed it on the right.