Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: raph on January 22, 2007, 06:53:12 pm

Title: Howto: Setup Help Plugin with chm-files and $(keyword)
Post by: raph on January 22, 2007, 06:53:12 pm
Hi guys

Being able to get help about the keyword under the cursor with just one keystroke makes developing much more easilier. Since I just found out how to do this (under WinXP) for chm-Helpfiles I decided to write this little tutorial.

Here are the steps:

1.) Get helpfile.
eg. if you are using wxWidgets, get wxWidgets-2.8.0-CHM.zip from here (http://sourceforge.net/project/showfiles.php?group_id=9863&package_id=19629).

2.) Get and install keyhh.exe
KeyHH allows you to open up a chm file and jump to a topic.
Get it here (http://www.keyworks.net/keyhh.htm) (original website) or here (http://dasdeck.de/staff/valentin/xtras/xdk_chm/KeyHH.zip) (non installer version).

3.) Setup Codeblocks
Open up Codeblocks, choose "Settings"->"Environment"->scroll down to "Help files".
click "Add" and type in a name for the helpfile.
(http://img441.imageshack.us/img441/5972/helpfilesadd7af.jpg) (http://imageshack.us)
click "OK", answer question
(http://img259.imageshack.us/img259/4642/browsequestion7dn.jpg) (http://imageshack.us)
with "Yes", and choose your .chm file.
Now (back to the "Environment settings" dialog), change the input field showing the path of the helpfile as following:
Quote
keyhh -#klink $(keyword) path_to_helpfile
Make sure, that "This line represents a full command to be executed" is checked and (if you want) "This is the default help file (shortcut: F1)":
(http://img231.imageshack.us/img231/8232/environmentsettings1jw.jpg) (http://imageshack.us)

Now you should be able to open up the helpfile, by rightclicking a keyword and choosing "Locate in" or (if you checked "This is the default help file (shortcut: F1)") by simply pressing F1:

(http://img255.imageshack.us/img255/3919/example9ok.jpg) (http://imageshack.us)

(http://img407.imageshack.us/img407/1461/prove1ho.jpg) (http://imageshack.us)

Hopefully someone will find this usefull.
Happy coding

raph
Title: Re: Howto: Setup Help Plugin with chm-files and $(keyword)
Post by: jpaterso on January 22, 2007, 10:10:59 pm
That's awesome! I wasn't aware of that feature. Thanks!

Joseph.
Title: Re: Howto: Setup Help Plugin with chm-files and $(keyword)
Post by: David Perfors on January 22, 2007, 10:22:12 pm
why do you need the keyhh program?
Title: Re: Howto: Setup Help Plugin with chm-files and $(keyword)
Post by: raph on January 22, 2007, 10:46:41 pm
because there is no other way to open up a chm file and jump directly to a chapter (here $(keyword))
Title: Re: Howto: Setup Help Plugin with chm-files and $(keyword)
Post by: David Perfors on January 22, 2007, 11:16:21 pm
Strange, when I do the steps ypu describe (step on wxString and F1) I just get the page I want...
Title: Re: Howto: Setup Help Plugin with chm-files and $(keyword)
Post by: Ceniza on January 23, 2007, 04:10:28 am
It should work just fine if you select a chm file. The plugin has special code for hlp and chm files under Windows.
Title: Re: Howto: Setup Help Plugin with chm-files and $(keyword)
Post by: Jan van den Borst on January 23, 2007, 09:57:54 am
Is there a way to associate "Locate in..." to a key f.e. control-F1?
Title: Re: Howto: Setup Help Plugin with chm-files and $(keyword)
Post by: raph on January 23, 2007, 11:04:02 am
It should work just fine if you select a chm file. The plugin has special code for hlp and chm files under Windows.
Wow you are right, realy impressive, that would have saved me a lot of work  :lol:
Title: Re: Howto: Setup Help Plugin with chm-files and $(keyword)
Post by: Pecan on January 23, 2007, 03:10:15 pm
Is there a way to associate "Locate in..." to a key f.e. control-F1?

There are two ways:

1) use Keyboard Shortcuts (keybinder) to add the Ctrl-F1 key to the Help (F1) entry on the menu. Menu->Editor->Keyboard Shortcuts.

2) use the KeyMacs plugin to define a macro such as {MENU}L{ENTER} and give it a command key of Ctrl-F1.

http://wiki.codeblocks.org/index.php?title=KeyMacs_plugin
 (http://wiki.codeblocks.org/index.php?title=KeyMacs_plugin)