What’s the best way to call context sensitive help from java?
I'm trying to use RoboHelp 10 to create some context sensitive help files for my Java App.
I've included robohelp_csh.java in my project and am aware of the CSH API call:
RoboHelp_CSH.RH_ShowHelp(0, "C:/my path to rbh output/index.htm", RoboHelp_CSH.HH_HELP_CONTEXT, 1002);
I've become aware that this will work only with 'published' robohelp output and possibly only with Web Help or Flash Help output.
RH_ShowHelp appears to just try and locate and load IEXPLORE.exe and pass a url. It loads internet explorer even though this is not my default browser. Annoyingly, this prompts me to enable scripting every time I load a help page. It also loads it into a new instance. Not something I want to inflict on my end users.
I’ve also tried:
Desktop.getDesktop().browse(uri) where uri is
For Web Help:
Uri = file:///C:/my path to rbh output/index.htm#<id=1002>>newwnd=false;
or for HTML5 help:
Uri = file:///C:/ my path to rbh output/index.htm?rhcsh=1&rhnewwnd=0&rhmapno=1002
These do open in my preferred browser but only display the home page and not the CSH page. However, if I paste the link in directly it does go to the correct page. I don’t know why this is the case.
I’ve tried using MS HTML Help and running :
HH.EXE -mapid 1002 ms-its:C:/ my path to rbh output/MyHelp.chm
This invokes the windows HH system and goes to the correct page, although a new instance is created for each help button press. I’m not sure how robust this solution is and how feature rich and capable HH is. Is HH always installed and available on the path?
I’ve finally decided to just load the CSH pages directly using the default browser with
Uri = file:///C:/my path to rbh output/desktop/my_csh_topic_name.htm
and ignoring the MAP IDs completely.
This works OK although a new tab is created for each help button press.
Anyone got any better solutions?
Am I doing anything wrong that prevents the MAP ID solution from working?
