Sign in to follow this  
Followers 0
Gerry

Opening a specific Topic in a CHM file

8 posts in this topic

Hi All

I have created a CHM file for my application. I open the CHM file with this line:

ShellExecute(@ScripDir & "\Help.chm")

I would ideally like to jump to a specific topic in the Help file, much like the context sensitive ehlp we AutoIt uses in its help file from the Scite editor.

Can anyone please shed some light on how to do this please?

Gerry

Share this post


Link to post
Share on other sites

Hi,

an example for AutoIT help:

ShellExecute ("hh.exe", "mk:@MSITStore:C:\Programme\AutoIt3\AutoIt3.chm::/html/credits.htm")

You might have to change Programme to Program Files.

Then try:

ShellExecute ("hh.exe", "mk:@MSITStore:C:\Program Files\AutoIt3\AutoIt3.chm::/html/credits.htm")

or

ShellExecute ("hh.exe", "mk:@MSITStore:'C:\Program Files\AutoIt3\AutoIt3.chm'::/html/credits.htm")

;-))

Stefan

Share this post


Link to post
Share on other sites

Thanks Stefan!

I didn't suspect it would be that easy! :idea:)

Gerry

Share this post


Link to post
Share on other sites

Stefan, sorry to bug you again

I tried your line and it works fine on the AutoIt CHM, I decompiled it and saw how the CHM was assembled and I can select different html files items in various folders.

ShellExecute ("hh.exe", "mk:@MSITStore:C:\Program Files\AutoIt3\AutoIt3.chm::/html/faq.htm")

Works like a charm.

Problem is when I do my rotten CHM file, it opens the file but says "The page cannot be dispayed"

Any ideas?

Gerry

Share this post


Link to post
Share on other sites

Try this Gerry, open up your CHM the normal way, navigate to the page you'd like to link to, and then right click in the background of the frame and choose Properties. That should give you the full address of the page you're looking for, maybe yours is formatted differently than the AutoIt one so it's not working the same.

Share this post


Link to post
Share on other sites

Hi Stefan

Thanks, I did as you said and it worked first time!

I really appreciate your help.

Gerry

Share this post


Link to post
Share on other sites

Hi,

that wasn't me, but @therks.....

;-))

Stefan

Share this post


Link to post
Share on other sites

I know this is an old topic, but thanks for the info.

Even simpler:

ShellExecute("hh.exe", ".\help.chm::/helptopic.html")

This avoids the problems from having a hard coded path in the command line; it works as long as the chm file is in the same directory as the program.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0