An easy way to do that sort of thing is to decompile the help file. You can decompile
any .CHM file using the -decompile switch on hh.exe. That gives you all of the original files that went into the help file, then you can do anything you want with them. I do this all the time to pull apart the index files and use them for keyword help in Visual SlickEdit.
Code: Select all
hh.exe -decompile C:\Temp\AhkHelpFiles C:\..path..to..ahk..\AutoHotkey.chm
In the folder you'll find
Table of Contents.hhc which is the generated table of contents in pseudo-HTML format, easy to parse with Regex's. The .HHC extension is what makes it the TOC. The first part of the filename will be whatever the original designer of the help file called it.
You will also find
Index.hhk, which is the index. Not all help files have an index, but if they have them it will always have an extension of hhk, and most of those I've seen have the same name. There will only be one index or TOC file.
The folder structure below that is determined by whoever made the help file. In the case of AHK file, everything is under a
docs\ folder.
This trick works were almost any .CHM file, although many will be missing the index file. Most of the time, the files you're searching her ordinary HTML, so you have to search using an HTML aware searching tool.
And of course, since this is an open source project you can also just download the original source files from
https://github.com/Lexikos/AutoHotkey_L-Docs.