13 Replies Latest reply on Apr 28, 2017 11:23 AM by jigneshs24552355

    Open CHM from another CHM

    jigneshs24552355 Level 1

      Hi guys,

       

      I would like to open a chm file in a separate window from another chm file. Both the chm files are in the same folder.
      Suppose one of my chm named XYZ.chm and another one is ABC.chm.

       

      Now, in my ABC.chm, I want to provide a link to open the XYZ.chm in a separate window. I tried these solutions:

       

      <a href="XYZ.chm">XYZ</a>.

       

      This does not open up anything.

       

      Then, I tried to provide link to a default topic name or home page topic in the XYZ.chm like this:

       

      <a href="XYZ.chm::/Welcome_to_Adobe.htm">XYZ</a>.

       

      This opens up a that particular topic "Welcome to Adobe" and that too in the same window of the ABC.chm.

       

      Then, I tried to provide a relative path but that too did not work.

       

      Then, I tried a local path. That did work but its not useful because it can always change.

       

      So, I am looking for a solution which is independent of the local path. Maybe, through a javascript or something if it is possible.

       

      Please help. Thanks in advance.

       

      - Jignesh

        • 1. Re: Open CHM from another CHM
          Captiv8r Adobe Community Professional & MVP

          Hi there

           

          Perhaps this recent thread helps?

           

          Re: Link .CHM to .CHM using FrameMaker/Robohelp

           

          Cheers... Rick

          • 2. Re: Open CHM from another CHM
            jigneshs24552355 Level 1

            Thanks Rick. I followed the HH.exe just like how it is explained in the link but it displays an error for me:

             

            Cannot open the file.

             

            In that thread, when you are talking about a folder along with the topic name, I am not sure what you meant exactly. I have both the chms in the same folder. Is the folder name still required?

             

            If so, then which folder name? I mean do we need to provide the exact directory.

             

            Here are the screenshots:

             

            Image1.jpg

            Image2.jpg

            Here is the code:

             

            <!--Metadata type="DesignerControl" startspan

              <object classid="clsid:D5F92943-15DB-11d1-8EED-00DC929131C8" id="Shortcut1"

              border="0" style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px;

              margin-right: 0px;" align="bottom">

              <param name="_Version" value="65536"  />

              <param name="_ExtentX" value="1693"  />

              <param name="_ExtentY" value="661"  />

              <param name="_StockProps" value="13"  />

              <param name="ForeColor" value="0"  />

              <param name="BackColor" value="15790320"  />

              <param name="UseButton" value="-1"  />

              <param name="UseText" value="0"  />

              <param name="ControlLabel" value="INFORM"  />

              <param name="UseIcon" value="0"  />

              <param name="Items" value=",HH.exe,ms.its:InformSlideshow.chm::/Welcome_to_Inform_Slideshow.htm$$**$$"

               />

              <param name="Image" value=""  />

              <param name="FontInfo" value="Arial,10,0,,"  />

              <param name="_CURRENTFILEPATH" value="d:\Informa_Localization\Online Help\Slide_View.htm"

               />

              <param name="_ID" value="Shortcut1"  />

              <param name="Items" value=",HH.exe,ms.its:InformSlideshow.chm::/Welcome_to_Inform_Slideshow.htm$$**$$"

               />

              <param name="Window" value=""  />

              </object>--><object

              classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11"

              id="Shortcut1"  type="application/x-oleobject">

              <param  name="Command"  value="Shortcut" />

              <param  name="Button"  value="Text:INFORM" />

              <param  name="Font"  value="Arial,10,0,," />

              <param  name="Item1"  value=",HH.exe,ms.its:InformSlideshow.chm::/Welcome_to_Inform_Slideshow.htm" />

            </object>

            <!--Metadata type="DesignerControl" endspan-->

             

             

             

            Please help.

             

            - Jignesh

            • 3. Re: Open CHM from another CHM
              Captiv8r Adobe Community Professional & MVP

              Hmmm, okay. This is going to sound weird, but bear with me.

               

              How exactly are you testing?

              Here's why I'm asking that question. If you have a CHM file that is linked to an application, and you are opening that CHM FROM the application, the actual pathing that the CHM would know about might be different. So it's entirely possible that if you opened the CHM in that manner, the button would fail. Even though both CHM files are inside the same folder.

               

              Now if you were to just find the CHM using Windows Explorer and double-click it, the button may well perform exactly as desired.

               

              And we need also to keep in mind that in today's world, there are now two different versions of the HTML Help Viewer (used to display CHM files), With the proliferation of 64 bit operating systems, we now have a 32 bit version of the HTML Help Viewer as well as a 64 bit version of the HTML Help Viewer. So it's possible that in addition to the oddity I mentioned earlier, perhaps your application is opening the 32 bit version of the viewer and there is some issue with using the control to open the 64 bit version. I'm not saying this is what's happening here, only that it may be a factor.

               

              Cheers... Rick

              • 4. Re: Open CHM from another CHM
                jigneshs24552355 Level 1

                Thanks Rick.

                 

                Regarding testing, for now

                I have generated the two chms and kept in the same folder.

                 

                I opened the chm from where I want to open the another chm.

                 

                I clicked on the button which displayed the message "Cannot open the file".

                 

                From your explanation, it looks like this should work.

                 

                Later, the final goal is that both the chm files will reside in the same folder after the installation of the application. Somewhere in the program files. The user has to open the main chm file from the application help button and from there, we would like to provide a link to another chm which should open in a separate window.

                 

                Is something I am missing?

                • 5. Re: Open CHM from another CHM
                  Captiv8r Adobe Community Professional & MVP

                  Hello again

                   

                  Does it work if you omit the file name? In this case the dialog would look like this:

                   

                  bc3.png

                   

                  Cheers... Rick

                  • 6. Re: Open CHM from another CHM
                    jigneshs24552355 Level 1

                    No Rick. And, strange, when I click on a button, it displays two dialogs of error messages:

                     

                    • 7. Re: Open CHM from another CHM
                      Captiv8r Adobe Community Professional & MVP

                      Try removing the ms.its bit so all that is in the field is the CHM file name (including the extension of .chm)

                      • 8. Re: Open CHM from another CHM
                        jigneshs24552355 Level 1

                        Great Rick. It worked finally,

                         

                        Though I do need to try from the application which I can only do it on Monday. Thank you very much for your help.

                         

                        I will update you on Monday if it works from the application too, I think it should work.

                        • 9. Re: Open CHM from another CHM
                          jigneshs24552355 Level 1

                          Thanks Rick for your help. It seems its working fine.

                           

                          Just have a small issue with the text alignment:

                           

                          The text on the button is not aligned with the text. It is just a bit on the top. Is there a way to fix it?

                          • 10. Re: Open CHM from another CHM
                            Captiv8r Adobe Community Professional & MVP

                            Hmmm, interesting proposition.

                             

                            Okay, here's the deal. I know how to make it happen, but it will require jumping through some hoops to get there. I tried to find a nice and easy way to accomplish it, but at the moment this is the best I've come up with. Hopefully others will see this and improve upon it.

                             

                            Here is a youtube video I just created to demonstrate.

                             

                            • 11. Re: Open CHM from another CHM
                              jigneshs24552355 Level 1

                              Thanks Rick for all your help. This did help as a temporary solution.

                               

                              So, I was just thinking if there is a way to convert a button into a hyperlink. I am not able to find a way from the shortcut wizard.

                               

                              If there is a hyperlink, it would be very useful.

                               

                              1. It would solve the issue of this alignment with the text.

                               

                              2. Another thing is it would more look like a link. The button does not give a clear indication to some users that it's a link. The button looks little old format too

                              • 12. Re: Open CHM from another CHM
                                Captiv8r Adobe Community Professional & MVP

                                Hello again

                                 

                                I believe this still works.

                                 

                                Drag the shortcut button to a different location on the page. I usually place mine at the page bottom.

                                 

                                Double-click the shortcut to see the properties and choose the Hidden (for scripts) item.

                                 

                                Click OK to accept the change and dismiss the dialog.

                                 

                                sc1.png

                                 

                                At this point the button should change appearance slightly and should still be selected.

                                 

                                Click the HTML view.

                                 

                                This should reveal the code behind the button. What you are here to discover is the ID value. Likely it will be "Shortcut". (unless there is more than one on the page)

                                 

                                Now we will configure the link. Select some text that the user will click. Make it a hyperlink. But where you would normally see the path and HTML file name, type JavaScript:Shortcut.Click();

                                 

                                sc2.png

                                Cheers... Rick

                                • 13. Re: Open CHM from another CHM
                                  jigneshs24552355 Level 1

                                  Great. Thanks Rick.