cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
DMR
DMR
Level V

Opening a help file at a specific page

Hi - I'd like to be able to open a compiled HTML help file (i.e. a .CHM file) created by the Windows Help Workshop from within JMP, but at a specified page.  The Open() command opens the file sure enough, but I can't work out how to specify the page - assuming of course that this is actually possible - either by adding an extra parameter or by modifying the address in some way.  The link to a Stack Overflow post below from a couple of years ago shows how to do it in the context of C#, and I'm therefore hoping that I can do effectively the same thing from within JMP.  Can it be done?

 

https://stackoverflow.com/questions/22300244/open-a-chm-file-to-a-specific-topic

1 ACCEPTED SOLUTION

Accepted Solutions
DMR
DMR
Level V

Re: Opening a help file at a specific page

Hi again Dave,

 

Success!  I've managed to get the RunProgram option to do what I want: the syntax is...

 

fullPath = "C:/Users/MyName/Documents/MyFolder/MySubFolderEtcEtc";

RunProgram(Executable("hh.exe"), Options(fullPath || "/MyHelpFile.chm::MyPage.htm") );

 

where "fullPath" is the complete path of the .CHM file; "MyHelpFile" is the name of my .CHM file, and "MyPage.htm" is the name of the page I want to display.  I can find out what that page name is by right-clicking on the relevant page of the opened CHM file, selecting "Properties" and reading the last part of the URL address, i.e. the part from the double colon onwards.  (The URL address is likely to be longer than the field in the Properties window can display, so just click inside the field and move the cursor as far right as it will go to make it readable.)

 

Many thanks for your help: I wouldn't have got there without it. 

 

 

 

View solution in original post

3 REPLIES 3
David_Burnham
Super User (Alumni)

Re: Opening a help file at a specific page

The Open function is remarkably flexibile but I suspect it wasn't intended to open CHM files.  If it does support the command line switches you are looking for then I'll let someone more knowledgeable tell you about them.  I would try looking at RunProgram to see if that might help you. As a fallback, JMP is moving documentation to HTML format so using a URL might be your easiest route (combined with the Web function).

-Dave
DMR
DMR
Level V

Re: Opening a help file at a specific page

Hi Dave - many thanks for that.  RunProgram looks promising (I haven't used it before, so I'll investigate and add to this thread if I get anywhere), but as you say, the Web function with a URL might be an easier option anyway.  I was originally intending to incorporate the Help file into an add-in that I'm writing, but actually it makes far more sense just to put it on our intranet.  Thanks again.

DMR
DMR
Level V

Re: Opening a help file at a specific page

Hi again Dave,

 

Success!  I've managed to get the RunProgram option to do what I want: the syntax is...

 

fullPath = "C:/Users/MyName/Documents/MyFolder/MySubFolderEtcEtc";

RunProgram(Executable("hh.exe"), Options(fullPath || "/MyHelpFile.chm::MyPage.htm") );

 

where "fullPath" is the complete path of the .CHM file; "MyHelpFile" is the name of my .CHM file, and "MyPage.htm" is the name of the page I want to display.  I can find out what that page name is by right-clicking on the relevant page of the opened CHM file, selecting "Properties" and reading the last part of the URL address, i.e. the part from the double colon onwards.  (The URL address is likely to be longer than the field in the Properties window can display, so just click inside the field and move the cursor as far right as it will go to make it readable.)

 

Many thanks for your help: I wouldn't have got there without it.