Prev: My VB6 Apps Crash
Next: string manipulation question
From: Mayayana on 18 Apr 2010 01:01 This might be of use to some: I wanted to be able to convert HXS files to CHM so that I could use any recent docs without necessarily installing a version of VS.Net, etc. (MS has not released an HXS viewer. There are free 3rd-party viewers, but they require the Help 2 runtime.... which requires VS.Net, recent MSDN subscription, etc. It's a circuitous mess of bloated dependencies, making it difficult to view HXS without installing lots of stuff and buying something or other.) The result is this: HXStoCHM http://www.jsware.net/jsware/scripts.php5#tochm It's a simple VBScript that can convert an entire Windows Platform SDK from HXS to CHM in a few minutes. By using it on something like the Win2003 Server SDK one can get collection of XP-era CHM files. Those can also be integrated into VS6 MSDN fairly easily with the tool from here: http://www.codeguru.com/cpp/w-p/help/msdn/article.php/c6507/ There is one catch, though: The HXS index does not translate perfectly to a CHM index. And many don't have an internal index to translate. The conversion works out pretty well, but not perfectly. It results in some redundant entries. etc. I'm not sure what the index would look like if one added the entire 2003 SDK collection to the 98 or 2001 collection.
From: GS on 18 Apr 2010 11:25 Mayayana formulated the question : > This might be of use to some: > > I wanted to be able to convert HXS files to CHM > so that I could use any recent docs without > necessarily installing a version of VS.Net, etc. > > (MS has not released an HXS viewer. There are free > 3rd-party viewers, but they require the Help 2 > runtime.... which requires VS.Net, recent MSDN > subscription, etc. It's a circuitous mess of bloated > dependencies, making it difficult to view HXS without > installing lots of stuff and buying something or other.) > > The result is this: > > HXStoCHM > http://www.jsware.net/jsware/scripts.php5#tochm > > It's a simple VBScript that can convert an entire > Windows Platform SDK from HXS to CHM in a few > minutes. By using it on something like the Win2003 > Server SDK one can get collection of XP-era CHM files. > > Those can also be integrated into VS6 MSDN fairly > easily with the tool from here: > > http://www.codeguru.com/cpp/w-p/help/msdn/article.php/c6507/ > > There is one catch, though: The HXS index does > not translate perfectly to a CHM index. And many don't > have an internal index to translate. The conversion > works out pretty well, but not perfectly. It results in > some redundant entries. etc. I'm not sure what the > index would look like if one added the entire 2003 SDK > collection to the 98 or 2001 collection. Sounds interesting! This might be of interest to some for fixing indexes and redundant entries: I have a product called CHMtoEXE which decompiles CHM files into HTML.exe (product name is "HTML Executable"), where I can edit any content and generates a stand-alone exe ('ebook') version of the CHM. Since CHMtoEXE is a companion app to HTML.exe it's necessary to have both, though I'm sure there's other solutions available to decompile CHMs into single htm files. (The author of both these apps is G.D.G. Software) The conversion process preserves the CHM structure fairly well, and HTML.exe assigns its own unique indexes for each page. I use this for app user guides instead of a CHM because it allows me all the same features as CHMs plus a great deal more flexibility. (Whatever can be done with a website is possible, including security access to pages) Thanks to Karl and some other folks in this NG, I've figured out a VB6 solution (SendMessage(), with Shell() [or ShellExecute()]) to enable me to make the UserGuide.EXEs behave like an in-process extension to my app. I use my web dev app to author pages. **Pages can be htm or html for the EXE. There is also going to be a php version coming out soon; ["PHP.exe" maybe?]** </> What might be more universally useful is to just generate the pages to htm so folks can rebuild indexes using their own CHM app. I used to use "HelpMATIC Pro", which is completely built in VB6, for building CHMs. Maybe you could hook up with harb at helpmatic.net for a solution to the indexing and redundancy issues.
From: Mayayana on 18 Apr 2010 12:14 | What might be more universally useful is to just generate the pages to | htm so folks can rebuild indexes using their own CHM app. Anyone can do that if they want to. There are already HTM pages. An HXS can be opened with 7-Zip. It's nearly the same as a CHM: There are htm files, a TOC, and usually an index. Microsoft switched from HLP to CHM when they were hot on the Internet fad. Then they switched to HXS when they got carried away with the XML fad. The format of the TOC, index and project file went from HTML to XML with HTML Help 2. But other than that it's pretty much the same. So anyone who wants to construct their own CHM project from the contents of an HXS can do so. That's been possible all along. But it would mean a very big authoring project for each HXS to CHM conversion. Do you really want to build a CHM from scratch for every HXS you run into? The whole point of my writing a script was to automate that, to make it a 1-click operation. | I used to use | "HelpMATIC Pro", which is completely built in VB6, for building CHMs. I don't understand that. You paid $70 for a program that does what MS HTML Help Workshop does for free? It looks like what you really bought is an HTML WYSIWYG editor. | Maybe you could hook up with harb at helpmatic.net for a solution to | the indexing and redundancy issues. | It's not a problem with the CHM index. Rather, the HXS index (when there is an internal one) seems to work differently. It's not really a big problem. The typical example of redundancy would be that an interface (IShellView, for example) might be in the index twice -- One link goes to the topic main page and the other pops up a list of links to the IShellView methods. I haven't figured out how Help2 deals with that. The HXK index files (Help2) are difficult to translate 1-to-1 into HHK index files (Help1). Also, in many cases with MS SDK files, there is only an external HXI file and no internal index. I don't know of any way to translate a compiled HXI to an HHK index file, so in those cases I create an index from the TOC topics. So there are two separate index issues. Neither of those issues is really an issue when reading a single CHM. Either way, a very usable index is produced. I'm only thinking of the redundancy as a potential disadvantage if one wants to integrate that index with the massive VB/VS6 MSDN viewer index. Nevertheless, if anyone is curious to work with this and comes up with a better conversion method than mine, I'd certainly be interested in that.
From: GS on 18 Apr 2010 13:46 > Anyone can do that if they want to. There are already > HTM pages. An HXS can be opened with 7-Zip. It's nearly > the same as a CHM: There are htm files, a TOC, and usually > an index... Does this mean 7-zip is a viable alternative to your solution if folks just want the pages? > The whole point of my writing a script was to automate that, > to make it a 1-click operation. That makes perfect sense to me? > I don't understand that. You paid $70 for a > program that does what MS HTML Help Workshop > does for free? It looks like what you really bought > is an HTML WYSIWYG editor. Yeah, it was $49 back in 2004 but you're absolutely right! I got this when I first started programming in VBA, and I had to install HTML Workshop to use it. Although, it certainly was much easier to get started making app user guides than it was using MS's HTML Workshop. -Surely they could have come up with something better than that...! > So there are two separate index issues. Neither of those > issues is really an issue when reading a single CHM. Either > way, a very usable index is produced. I'm only thinking of > the redundancy as a potential disadvantage if one wants > to integrate that index with the massive VB/VS6 MSDN > viewer index. That's way over my head. I don't wander much outside of VB/VBA stuff anyway, but the transition to 64-bit OSs may change that sooner than later. The reason I bought VS6 was so I could make DLLs to use with my VBA apps. Now I use it to make COMAddins mostly, but since M$ made the changes in MSO12 I got ticked off about having to redo all my Excel addins. Thus, I found VB6 useful for non MSO dependant versions of my Excel addins too. This NG has been, and continues to be tremendous help to my ongoing VB education process. I appreciate your contribution to that process! Kind regards, Garry
From: Mayayana on 18 Apr 2010 15:12
|> Anyone can do that if they want to. There are already | > HTM pages. An HXS can be opened with 7-Zip. It's nearly | > the same as a CHM: There are htm files, a TOC, and usually | > an index... | | Does this mean 7-zip is a viable alternative to your solution if folks | just want the pages? | Sure. If you open an HXS file (Help2) in 7-Zip you'll find something very similar to a Help1 project. An HXS is some kind of compressed format. I don't think most ZIP programs recognize it, but 7-Zip does. Or at least it recognizes enough to get what matters. It seems that 7-zip will *try* to open lots of files types, but the results are variable. In some cases (like with MSIs) the results are more gibberish than useful. With HXS the results are more useful than gibberish, but there's gibberish, too. :) .HXT = .HHC .HXK = .HHK .HXC + .HXF = .HHP (sort of) And just as with CHMs, there will be a collection of web files: .htm, .jpg, etc. But it's just a pile of webpages. It's like decompiling a CHM. The result, by itself, is not of much value. |