Application Help Files

Just starting out? Need help? Post your questions and find answers here.
collectordave
Addict
Addict
Posts: 1309
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

Application Help Files

Post by collectordave »

Hi All,

Just starting to put together help files for my PB App crossplatform.

Using simple html makes it viewable in just about every browser and the web gadget. I gave up on .chm files.

I am assuming that there are free simple html editors available for each platform.

As I programme I write a small html help page everytime I think the user may need a little help.

The big pain is making the index.html page putting all those links together to check it all works.

I am programming a small app to take all the html files in my help folder and add my application title and various chapters to produce an index.html file.

Together with this is a small module using the webgadget to display each or any page.

Have main bit scetched out and running and the module done but needs refinement.

Anyone interested and I will post the code here.

Regards

CD
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
mestnyi
Addict
Addict
Posts: 1000
Joined: Mon Nov 25, 2013 6:41 am

Re: Application Help Files

Post by mestnyi »

I also thought about helping, how to do this?
That it was the same everywhere and it was convenient to supply and use. For example, Purebasic in Windows is convenient and there is no Linux
collectordave
Addict
Addict
Posts: 1309
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

Re: Application Help Files

Post by collectordave »

Hi mestnyi

I have this working on windows,MAC and Linux.

When writing your programme simply include the help module. This is really just webgadget in a window used to display your help files. Sgowing help from anywhere in the programme is then just a call to open the help window with the topic as a parameter (The topic is the help file filename). All simple htmal no java or any fancy stuff.

The index build utility I am writing has three levels Application which is just the title of your application, Chapter which simply adds a chapter entry in the index to group topics, and topics each of which is a single html help file you create. You can add chapters and topics as you wish and move them up and down changing their position in the final help index. Basically building a contents page for your help files.

So as simple as possible but workable and cross platform.

Better if you can download the code which is very scrappy at the moment just me playing with the idea. Compile this in windows to see what I mean. Let me know and I will package it all up warts an all and post a link for you.

Regards

CD

Of course I have not yet written the help files for this little app yet.
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: Application Help Files

Post by davido »

@collectordave,
I would be interested, if you feel able to share your code.
DE AA EB
collectordave
Addict
Addict
Posts: 1309
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

Re: Application Help Files

Post by collectordave »

Ok for all interested parties here is the link to the source. https://www.dropbox.com/s/gvgckmgww54so ... s.zip?dl=0

This is the whole project so far.

In the project folder you will find a folder called Help that is empty. It is ready for when I build the help files for the project.

You will also find a folder Help Test. This is where I am building the help for a larger project as a test.

When running click menu Files|Open and then navigate to the Help test folder the help project file is there (extension .pbh) double click to open and it will load.

To see how it all comes out just double click index.html in the help test folder it will open in your normal browser.

To see what happens if you use the webgadget you will see a button with a page and pencil after loading a project click this and the prog will build the index.html again and display in the webgadget.

Selecting Files|New is eoughly the same except you are asked for the folder where your help files are and for an application title. Once done the programme loads all html files in that folder as topics.

Please play and enjoy and let me know where things can be improved.

Kind Regards

CD
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: Application Help Files

Post by srod »

That's a nice idea - been thinking about something similar myself though unsure whether I would use html pages or use xml schemas to render pages to a simple canvas based control. I simply do not like working with HTML - never have done. :) And CHM files are a pain in the a*se at the best of times.

I think you can turn that into something very useful indeed. I do think you need some navigation buttons in the help viewer; 'Back' and 'Forward' etc. and I would remove the hard-coded location of the resource images if I were you. :wink:

Thanks for sharing. Interested in keeping an eye on this.
I may look like a mule, but I'm not a complete ass.
collectordave
Addict
Addict
Posts: 1309
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

Re: Application Help Files

Post by collectordave »

Thankyou for your kind comments,

I am using html so a beginer can make help pages and include them in their own projects easily. Also keeping them simple as, in my dreams, I am looking at rendering the html to a canvas gadget and also to take the whole of a project to not only produce the index.html but also to print a manual in pdf form from the html and project file.

For me html is best as it can be zipped up sent to any computer and displayed with the minimum of fuss in, I think every browser there is.

Let me know if my thinking id a little awry.

regards

CD

ps Forgot to mention the module is included dlgHelpViewer.pbi once included in your project just call it

;View the Help File
HelpViewer::Open(HelpProjectPath + "index.html")

pps Some other reasons for using html is that after creating index.html it can be editrd in your own html editor to make it look exactly how you wish I also have an idea to use templates for application and chapter pages so the manual could look a little more professional.
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: Application Help Files

Post by davido »

@collectordave,
Thank you for your swift reply.

After changing the hard-coded paths to the images, as suggested by srod, it ran perfectly on my MacBook. Looks good so far.

I'll check it out more carefully over the next few days.
DE AA EB
collectordave
Addict
Addict
Posts: 1309
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

Re: Application Help Files

Post by collectordave »

The hard coded images were in my test html files all removed now I hope. Have now included the help files I am working on for my application.

Also found it a pain to keep navigating to my help project so I have added a recent files menu to the project.

same download link above.

CD
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: Application Help Files

Post by srod »

It was the hard coded image locations in your PB source that were the problem. :wink:
I may look like a mule, but I'm not a complete ass.
collectordave
Addict
Addict
Posts: 1309
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

Re: Application Help Files

Post by collectordave »

Hi All

Hit a little problem when moving files to other platforms web gadget not allways the same some quite complicated HTML.

I have now sketched out a little programme to produce help files not based on html but on the canvas gadget supporting multiple projects as well. Help viewer also based on canvas. No help compilers or HTML editors used at all. Best shot at xplatform I think.

Once it runs with no bugs I will post.

Regards

CD
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
collectordave
Addict
Addict
Posts: 1309
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

Re: Application Help Files

Post by collectordave »

Programme working available here viewtopic.php?f=13&t=72328

Can be improved.

CD
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
Post Reply