Page 1 of 1

How is PureBasic Help coded?

Posted: Sat Jul 18, 2020 6:58 pm
by davido
Is it possible to code something like the PureBasic Help screen?
If so, can someone give me a hint on how to proceed?

Re: How is PureBasic Help coded?

Posted: Sat Jul 18, 2020 7:05 pm
by wilbert
The PureBasic IDE is Open Source now ( viewtopic.php?f=14&t=74151 ).
You can look at its source code to see how it is done.

Re: How is PureBasic Help coded?

Posted: Sun Jul 19, 2020 3:47 pm
by kpeters58
davido wrote:Is it possible to code something like the PureBasic Help screen?
If so, can someone give me a hint on how to proceed?
I am assuming that you'd like to know how they produce their help file in .CHM format...?

If that's what you are asking for, most professionals will use a help authoring tool for this:

https://www.g2.com/categories/help-authoring-tool-hat

As with many things, you get what you pay for - good ones are not cheap. I have used Help & Manual for many years with great success.
Note that this is typically Windows only (*.hlp, *chm). These tools can also produce output in many other formats as well (*.html, *.pdf etc.)

I now write my help in in a HTML-Editor in HTML/CSS (with templates for a uniform look) and display if from within my PB applications in the web gadget, which gives me perfect cross-platform help.

Re: How is PureBasic Help coded?

Posted: Sun Jul 19, 2020 7:10 pm
by davido
Thank you both for your help.
Some interesting possibilities for me to look into.

Re: How is PureBasic Help coded?

Posted: Sun Jul 19, 2020 8:00 pm
by RNBW
I have been using HelpNDoc for some time. A free download is available - it just includes a single line advert. The Standard Edition, if you want to buy is 99Euros, but to try out the free version is fine. It's very easy to use and you can import a .chm file.

It outputs to many different formats (CHM, HTML, Word, PDF, ePub, Kindle, etc). The free version includes the single line advert on them all and the Standard on all but CHM and HTML.

It's worth downloading the free version just to see if it suits your needs. it may be all you need https://www.helpndoc.com/

Re: How is PureBasic Help coded?

Posted: Sun Jul 19, 2020 8:36 pm
by Shardik
You may also take a look into deeproot's excellent and truely cross-platform HelpViewX. It utilizes two XML files for contents and index and HTML files for the help infos. You should try deeproot's HelpViewX.PBI together with the examples in his HelpExample folder contained in his zip file.

Unfortunately PureBasic's native OpenHelp() command seems to be broken on Linux and MacOS for a long time (Did it ever work?) but works nicely on Windows.

Re: How is PureBasic Help coded?

Posted: Mon Jul 20, 2020 9:07 am
by deeproot
Shardik wrote:Unfortunately PureBasic's native OpenHelp() command seems to be broken on Linux and MacOS for a long time (Did it ever work?) but works nicely on Windows.
Yes my module used to work fine on all platforms and was my alternative to OpenHelp(). However, on Linux it is currently broken due to the problem of unavailable libwebkitgtk in recent distro versions :( As a temporary fix I switched my project to use plain text help files instead of HTML, which is good enough for now. The contents and index part work the same. I'm planning to look into using Thorsten1867's excellent Markdown gadget module, but with my own variation of viewer window. Unfortunately I do not have much time for coding right now, but if I eventually get anything useful then I'll post an update.

BTW - I also still use .chm files on Windows and these are generated by MS HTML Help Workshop, which is a bit outdated, relatively simple but free. It is usable even for quite large help documentation and I use exactly the same HTML source files for all methods/platforms, including the text versions which are just converted. My original idea was to use PureBasic's OpenHelp when possible and my own OpenHelpX when not.

Re: How is PureBasic Help coded?

Posted: Mon Jul 20, 2020 1:19 pm
by blueb
davido wrote:Thank you both for your help.
Some interesting possibilities for me to look into.
A year or so ago I built an 'RTF' based Help system and a little later a 'WebGadget' based Help Sytem becasu some early versions of Windows had some refresh issues.

viewtopic.php?p=533013#p533013

They consist of a 'Builder' program and 'Viewer' program that you include in your program.

All source files are included, and still available in my DropBox account.

You might get some ideas. :)