Issue using DocMaker

Just starting out? Need help? Post your questions and find answers here.
XCoder
User
User
Posts: 68
Joined: Tue Dec 31, 2013 9:18 pm

Issue using DocMaker

Post by XCoder »

There is very little information on how to use DocMaker and I am having a problem compiling a help file with it.

I put the following code in a document named TestLib.txt and placed it in the English folder under the DocMaker folder.

Code: Select all

; Source file for the test library

@Library TestLib

@Overview

This is a file to try out DocMaker

@OS Windows

@CommandList

@SupportedOS Windows, AmigaOS, Linux

; -------------------------------------------------------------------------------

@Function IsMouseInGadget(hGadget)

@Description
  Determines whether the cursor is in a gadget
  
@Parameter
  hGadget - the Window's handle of the gadget to monitor
  
@ReturnValue
  Returns #True if the mouse is in the gadget
@LineBreak
  Returns #False if the mouse is not in the gadget
  
@SupportedOS Windows, AmigaOS, Linux

I compiled the chm file using the output format HTML in DocMaker. I ticked the boxes Creates chm and User library mode as I will be linking the help file to a library.

During the compilation stage I see an error message:
HHC5003: Compilation failed while compiling Reference\reference.html
The output folder contains another folder, testlib, that only contains two files: index.html and ismouseingadget.html.
The file reference.html is not created.

When I open the chm file it shows the text "Can't reach this page". However when I click on the root folder (TestLib) it correctly displays the details for the overview. Also I can expand the help file to get the help text for the IsMouseInGadget().

On examining the chm file with the program FarHelp I found that the Home Page file is set to Reference/reference.html and the Default Topic File is also set to Reference/reference.html

I'm using DocMaker to produce the chm file as I want to open the appropriate help information when I put the cursor on IsMouseInGadget in the PB IDE and click F1.

How can I resolve this problem?
Fred
Administrator
Administrator
Posts: 16621
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Issue using DocMaker

Post by Fred »

There is a switch to create an userlibrary doc, as there is no main reference topics.
XCoder
User
User
Posts: 68
Joined: Tue Dec 31, 2013 9:18 pm

Re: Issue using DocMaker

Post by XCoder »

Fred wrote: Mon Mar 07, 2022 12:56 pm There is a switch to create an userlibrary doc, as there is no main reference topics.
@Fred:
Thanks for a fast reply.

I set the switch by ticking the User library mode box so I think you are suggesting that this error message can be ignored?

There is still an issue with the chm file and pressing F1 to get help information:

I placed the compiled file in the ...PureBasic\Help\ folder. When I put the cursor on IsMouseInGadget in the PB IDE and press F1 my help file opens but shows the text "Can't reach this page". When I click on the root folder (TestLib) it correctly displays the details for the overview. I found that I can expand the help file to get the help text for the IsMouseInGadget().

How can I ensure that pressing F1 opens my help file at the branch in the help file for IsMouseInGadget()?
Fred
Administrator
Administrator
Posts: 16621
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Issue using DocMaker

Post by Fred »

I will do a quick test soon to see if all is still working as expected as we don't use it for user lib in the main package.
AZJIO
Addict
Addict
Posts: 1319
Joined: Sun May 14, 2017 1:48 am

Re: Issue using DocMaker

Post by AZJIO »

XCoder
You can try this help compiler from AutoIt3, there is a sample help for PureBasic for some modules and functions.
XCoder
User
User
Posts: 68
Joined: Tue Dec 31, 2013 9:18 pm

Re: Issue using DocMaker

Post by XCoder »

@AZJIO
AZJIO wrote: Mon Mar 07, 2022 4:20 pm XCoder
You can try this help compiler from AutoIt3, there is a sample help for PureBasic for some modules and functions.
I have tried to get to grips with your utility but as it is written in Russian I found this difficult and something seems to be going wrong.

I put a file named DoesFileExist.pb in the folder ...\DynamicSRC\au3UserExamples\

I put the following text file named DoesFileExist.txt in the folder ...\DynamicSRC\txtUserFunctions\

Code: Select all

###User Defined Function###
DoesFileExist

###Description###
Determines whether a file exists

###Syntax###
DoesFileExist(@Filename)

###Parameters###
@@ParamTable@@
@Filename
	A pointer to a string containing the filename to check

@@End@@

###ReturnValue###
@@ReturnTable@@
#True if the file exists
#False if the file does not exist
@@End@@

###Remarks###
None.

###Related###
None.
I guessed that the name of this file had to be added to CustomUDFsMgt.txt in the folders ...\MainSRC_W_User\ and ...\MainSRC_B_User\ and so I added it to the last branch of the existing structure:

Code: Select all

...
Other Management.htm	Other
	DoesFileExist
	SplitL
I ran SD_AutoIt_Help_Builder_Mod.au3 to compile the chm help file.

However the help topic did not appear in the help file.

Although DoesFileExist.htm was added to the folder ...\Forge\Examples\au3Userexamples\ this contained the PB code.

What went wrong?
AZJIO
Addict
Addict
Posts: 1319
Joined: Sun May 14, 2017 1:48 am

Re: Issue using DocMaker

Post by AZJIO »

https://disk.yandex.ru/d/ZKf2LA_Dq7YFLw
Translated into English
1251 -> 1252

XCoder
@Filename -> *Filename
Last edited by AZJIO on Wed Mar 09, 2022 5:38 pm, edited 1 time in total.
XCoder
User
User
Posts: 68
Joined: Tue Dec 31, 2013 9:18 pm

Re: Issue using DocMaker

Post by XCoder »

@AZJIO:

Thanks for the translation.

I decided to add another help topic to the help file as follows, but it did not work.

I added the following text file to the folder ..\DynamicSRC\txtUserFunctions\:

Code: Select all

###User Defined Function###
IsMouseInGadget

###Description###
Determines whether the mouse cursor is in a specified gadget

###Syntax###
IsMouseInGadget(hGadget)

###Parameters###
@@ParamTable@@
hGadget
	The Windows ID of the gadget
@@End@@

###ReturnValue###
@@ReturnTable@@
#True if the mouse cursor is in the specified gadget
#False if the mouse cursor is not in the specified gadget
@@End@@

###Remarks###
None.

###Related###
None.
Then I updated the file CustomUDFsMgt.txt in the folders ..\MainSRC_B_User\ and ..\MainSRC_W_User\ to:

Code: Select all

Other Management.htm	Other
	DoesFileExist
	IsMouseInGadget
When I compiled the code only the help topic for DoesFileExist could be seen.

I must have missed something out. What should I do to get the second help topic to show?
AZJIO
Addict
Addict
Posts: 1319
Joined: Sun May 14, 2017 1:48 am

Re: Issue using DocMaker

Post by AZJIO »

you missed the following:
MainSRC_B_User\UDFs3\CustomUDFs_TOC.hhc
MainSRC_B_User\UDFs3\CustomUDFs_Index.hhk
Use the "generating an index based on Black.au3" file to copy from the black theme to the white theme folder. Otherwise, you will have to edit both topics each time.

And also when you add a new file, you need to check the box "Rebuild the syntax. block (yellow)". In this case, you need to compile 2 times, because the first time a syntax file is created, and the second time it is added.
These files are created on first compilation:
\tmpTest\IsMouseInGadget.htm
\tmpTest\IsMouseInGadget.pb
XCoder
User
User
Posts: 68
Joined: Tue Dec 31, 2013 9:18 pm

Re: Issue using DocMaker

Post by XCoder »

@AZJIO:

Thanks for a fast reply.

I hadn't used the "generating an index based on Black.au3" file nor did I tick the box "Rebuild the syntax. block (yellow)".

I tried again following the instructions in your last post but only the topic "DoesFileExist" is shown in the chm file.
AZJIO wrote: Wed Mar 09, 2022 5:49 pm you missed the following:
MainSRC_B_User\UDFs3\CustomUDFs_TOC.hhc
MainSRC_B_User\UDFs3\CustomUDFs_Index.hhk
I'm not sure what I should do with these two files; I noticed that CustomUDFs_Index.hhk has recompiled with the current (compile) time, but CustomUDFs_TOC.hhc has not updated. Is this the problem?
AZJIO
Addict
Addict
Posts: 1319
Joined: Sun May 14, 2017 1:48 am

Re: Issue using DocMaker

Post by AZJIO »

CustomUDFs_TOC.hhc - this is the content you see on the left. If it does not contain the items of the files you added, then they are not in the finished CHM file either.
XCoder
User
User
Posts: 68
Joined: Tue Dec 31, 2013 9:18 pm

Re: Issue using DocMaker

Post by XCoder »

@AZJIO:

CustomUDFs_TOC.hhc does not contain the name of the second file:

Code: Select all

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML>
<HEAD>
<meta name="GENERATOR" content="Notepad++ & AutoIt ^_^">
<!-- Sitemap 1.0 -->
</HEAD><BODY>


<OBJECT type="text/site properties"><param name="Window Styles" value="0x25"><param name="ImageType" value="Folder"></OBJECT>
<UL>

<LI><OBJECT type="text/sitemap"><param name="Name" value="DoesFileExist"><param name="Local" value="html\userfunctions\DoesFileExist.htm"></OBJECT>


</UL>

</UL>
</BODY></HTML>
Should I add this manually? Alternatively what should I do to add the extra help topic using your utility?
Thanks.
AZJIO
Addict
Addict
Posts: 1319
Joined: Sun May 14, 2017 1:48 am

Re: Issue using DocMaker

Post by AZJIO »

XCoder wrote: Wed Mar 09, 2022 7:38 pm Should I add this manually? Alternatively what should I do to add the extra help topic using your utility?
Look in the first link, where there are 2 sections with several functions. Use it as an example. Press Ctrl+D to duplicate the line and replace the file name and function name in it. There is nothing complicated here.

CustomUDFs_Index.hhk - contains search strings in the Index tab of the CHM file
PB User
XCoder
User
User
Posts: 68
Joined: Tue Dec 31, 2013 9:18 pm

Re: Issue using DocMaker

Post by XCoder »

Thanks, AZJIO

Unfortunately there is still an issue with pressing F1 to get help information in the PB IDE.

I suspect this may be a bug with the PB IDE. Hopefully Fred will be looking into it as mentioned in a previous post in this thread.
AZJIO
Addict
Addict
Posts: 1319
Joined: Sun May 14, 2017 1:48 am

Re: Issue using DocMaker

Post by AZJIO »

XCoder wrote: Thu Mar 10, 2022 6:09 pm Unfortunately there is still an issue with pressing F1 to get help information in the PB IDE
Try using HelpPB (Windows). Add it as a tool:
Help.exe
"%WORD" 1

Help.ini - set the data correctly here

Code: Select all

[pb]
PathCHM="C:\Program Files\Purebasic\PureBasic.chm"
TitleCHM="Справка PureBasic 5.70 (10.02.2019)"
Exact_match=1
Set hotkey F1
Post Reply