Author Topic: Howto: Setup Help Plugin with chm-files and $(keyword)  (Read 8534 times)

Offline raph

  • Almost regular
  • **
  • Posts: 242
Howto: Setup Help Plugin with chm-files and $(keyword)
« 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.

2.) Get and install keyhh.exe
KeyHH allows you to open up a chm file and jump to a topic.
Get it here (original website) or here (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.

click "OK", answer question

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)":


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:





Hopefully someone will find this usefull.
Happy coding

raph
« Last Edit: January 22, 2007, 06:54:54 pm by raph »

Offline jpaterso

  • Multiple posting newcomer
  • *
  • Posts: 57
Re: Howto: Setup Help Plugin with chm-files and $(keyword)
« Reply #1 on: January 22, 2007, 10:10:59 pm »
That's awesome! I wasn't aware of that feature. Thanks!

Joseph.

Offline David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Re: Howto: Setup Help Plugin with chm-files and $(keyword)
« Reply #2 on: January 22, 2007, 10:22:12 pm »
why do you need the keyhh program?
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

Offline raph

  • Almost regular
  • **
  • Posts: 242
Re: Howto: Setup Help Plugin with chm-files and $(keyword)
« Reply #3 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))

Offline David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Re: Howto: Setup Help Plugin with chm-files and $(keyword)
« Reply #4 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...
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Howto: Setup Help Plugin with chm-files and $(keyword)
« Reply #5 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.

Offline Jan van den Borst

  • Multiple posting newcomer
  • *
  • Posts: 99
Re: Howto: Setup Help Plugin with chm-files and $(keyword)
« Reply #6 on: January 23, 2007, 09:57:54 am »
Is there a way to associate "Locate in..." to a key f.e. control-F1?

Offline raph

  • Almost regular
  • **
  • Posts: 242
Re: Howto: Setup Help Plugin with chm-files and $(keyword)
« Reply #7 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:

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2784
Re: Howto: Setup Help Plugin with chm-files and $(keyword)
« Reply #8 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