CHM
BlitzMax Forums/BlitzMax Programming/CHM
| ||
How do you get a CHM help file to open from bmax? |
| ||
I just got the BlitzMax help one to open by using:system_("c:\windows\hh BlitzMaxHelp v118a.chm")That makes some assumptions about the paths to hh.exe and the .chm file, but those could be handled more carefully. |
| ||
Hm, What version of bmax are you using? ( 1.18 here ) I tried these and none work: system_("C:\PROJECTS\Gellyware\games\sudoku6\2006_0330\help.chm") system_(AppDir+"/help.chm") system_(AppDir+"\help.chm") |
| ||
I'm using 1.18 as well. The reader program is hh.exe (located in the Windows directory, at least in XP), so that's what's really running, with the .chm as a parameter. I just tried this (which is a little clearer about "hh") and it works with the BlitzMaxHelp file in the same directory as the calling program: system_ "c:\windows\hh.exe " + AppDir + "\BlitzMaxHelp v118a.chm"It starts the BlitzMaxHelp CHM file and freezes the calling program until the CHM is closed, then returns control (which may or may not be a good thing). A recent thread discusses ways to avoid that if you prefer: http://blitzbasic.com/Community/posts.php?topic=53370 But it's hh.exe that seems to be the key to viewing .chm files. |
| ||
Good Find! That does the trick, now to only solve the problem of locating hh.exe without using c:\windows What if the user has windows on D: |
| ||
What if the user has windows on D: Yeah, that's a tricky bit. Blitz3D had the nice SystemProperty ("windowsdir"), but I don't know of an equivalent in BlitzMax (that doesn't mean there isn't one lurking somewhere, though <g>). There's a recent thread on enumerating all drives on a PC. Perhaps you could check each one to see if it contains "\windows\hh.exe": http://blitzbasic.com/Community/posts.php?topic=57747 Or -duh- it just hit me that since hh.exe is in the \Windows dir, I didn't need to specify a path to it. This should work regardless of which drive Windows is on (as long as hh.exe exists somewhere within the set of Windows paths): system_ "hh.exe " + AppDir + "\BlitzMaxHelp v118a.chm" |
| ||
That worked! :) I tried it but I forgot the neccessary space AFTER the hh.exe(space goes here) Thanks WendellM |