[Semi-SOLVED] **Topical** API Help on API Keyword using F1 help key

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
AZJIO
Addict
Addict
Posts: 2141
Joined: Sun May 14, 2017 1:48 am

Re: API Help on API Keyword using F1 help key

Post by AZJIO »

Randy Walker wrote: Mon Jun 16, 2025 1:56 am If you can't find it and would like a working copy of the win32.hlp file compatible on Win 11 and various releases of pureBasic for Windows, I'm sure there is a way I could upload it somewhere for you to grab it.
I have win32.hlp, but not WinHlp32.exe
Randy Walker
Addict
Addict
Posts: 989
Joined: Sun Jul 25, 2004 4:21 pm
Location: USoA

Re: API Help on API Keyword using F1 help key

Post by Randy Walker »

AZJIO wrote: Mon Jun 16, 2025 1:59 am
Randy Walker wrote: Mon Jun 16, 2025 1:56 am If you can't find it and would like a working copy of the win32.hlp file compatible on Win 11 and various releases of pureBasic for Windows, I'm sure there is a way I could upload it somewhere for you to grab it.
I have win32.hlp, but not WinHlp32.exe
Oh, sorry, I don't read so well. I ziped up my Help folder and uploaded it where you can grab it. It is the complete folder so just download and unzip it directly into your main PB folder(s)
https://www.hostize.com/v/ddKS-aM_IO
This is what I have working well here on my Win 11 Pro machine.
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
Randy Walker
Addict
Addict
Posts: 989
Joined: Sun Jul 25, 2004 4:21 pm
Location: USoA

Re: API Help on API Keyword using F1 help key

Post by Randy Walker »

Randy Walker wrote: Mon Jun 16, 2025 2:16 am I zipped up my Help folder and uploaded it where you can grab it. It is the complete folder so just download and unzip it directly into your main PB folder(s)
https://www.hostize.com/v/ddKS-aM_IO
This is what I have working well here on my Win 11 Pro machine.
UHhhh, come to think about it, I remembered Long ago when I first encountered this issue occurring after a new jaPBe installation, A trusted PB user passed me this other file to enable F1 on API keywords, so I'm making it available here too:
https://www.hostize.com/v/DEZLwF1WHY
It has a "Run this Bat as Administrator" file that I did run without any issue. I won't recommend it because I cannot say I know exactly what it does, but if adding the Help folder alone I provided above does not work for you then you might give this a try. Best I can tell you for sure is running the bat did no detectable harm here and my F1 Help is working Great!!
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
User avatar
Caronte3D
Addict
Addict
Posts: 1355
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: API Help on API Keyword using F1 help key

Post by Caronte3D »

Randy Walker wrote: Sun Jun 15, 2025 11:53 pm
Caronte3D wrote: Sun Jun 15, 2025 6:31 pm Take a look:
viewtopic.php?t=87093
Thanks Caronte3D, but that doesn't work at all. I'm asking for "topical help" on API keywords that actually looks at the cursor position and gives 'topical" help on that specific keyword same as we get now if the cursor is resting on a PB keyword and we press F1.
Works for me:
Image
Randy Walker
Addict
Addict
Posts: 989
Joined: Sun Jul 25, 2004 4:21 pm
Location: USoA

Re: API Help on API Keyword using F1 help key

Post by Randy Walker »

Caronte3D wrote: Mon Jun 16, 2025 7:57 am
Randy Walker wrote: Sun Jun 15, 2025 11:53 pm
Caronte3D wrote: Sun Jun 15, 2025 6:31 pm Take a look:
viewtopic.php?t=87093
Works for me:
Image
Cool. I guess we are both satisfied with what we've got.
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
AZJIO
Addict
Addict
Posts: 2141
Joined: Sun May 14, 2017 1:48 am

Re: API Help on API Keyword using F1 help key

Post by AZJIO »

Randy Walker wrote: Mon Jun 16, 2025 1:49 am Is it built-into the IDE?
Now it makes sense for you to try it, since I did it with a black design style.
Download

Image

If you are interested in how this is done, then unzip and open the file: win32\popup\css\Header.css
I made a text replacement using a regular expression:
1. Constants
Find: >([A-Z][A-Z_\d]+?_[A-Z_\d]++)</TD>
Replacement: ><font class="cons">\1</font></TD>
2. Subsections on the page
Find: <P><B>Parameters</B></P>
Replacement: <p class="section">Parameters</p>
Execute for: Parameters, Remarks, Errors, See Also, Return Values, Members
3. Table headers
Find: <B>Meaning</B></TD>
Replacement: <font class="fldth">Meaning</font></TD>
Execute for: Value, Meaning, Action
4. Comments
Find: (// [^\r\n<]++)
Replacement: <font class="comm">\1</font>
5. Links
Find: <A HREF="(.+?).htm"><B>(\w+)</B></A>
Replacement: <A HREF="\1.htm">\2</A>
Randy Walker
Addict
Addict
Posts: 989
Joined: Sun Jul 25, 2004 4:21 pm
Location: USoA

Re: API Help on API Keyword using F1 help key

Post by Randy Walker »

AZJIO wrote: Tue Jun 17, 2025 1:31 am
Randy Walker wrote: Mon Jun 16, 2025 1:49 am Is it built-into the IDE?
Now it makes sense for you to try it, since I did it with a black design style.

If you are interested in how this is done, then unzip and open the file: win32\popup\css\Header.css
I made a text replacement using a regular expression:
1. Constants
Find: >([A-Z][A-Z_\d]+?_[A-Z_\d]++)</TD>
Replacement: ><font class="cons">\1</font></TD>
2. Subsections on the page
Find: <P><B>Parameters</B></P>
Replacement: <p class="section">Parameters</p>
Execute for: Parameters, Remarks, Errors, See Also, Return Values, Members
3. Table headers
Find: <B>Meaning</B></TD>
Replacement: <font class="fldth">Meaning</font></TD>
Execute for: Value, Meaning, Action
4. Comments
Find: (// [^\r\n<]++)
Replacement: <font class="comm">\1</font>
5. Links
Find: <A HREF="(.+?).htm"><B>(\w+)</B></A>
Replacement: <A HREF="\1.htm">\2</A>
Unnecessary exercise Way too complicated for my brain. Already have the F1 help I was looking for. Thanks.
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
AZJIO
Addict
Addict
Posts: 2141
Joined: Sun May 14, 2017 1:48 am

Re: API Help on API Keyword using F1 help key

Post by AZJIO »

Randy Walker wrote: Tue Jun 17, 2025 3:20 am Unnecessary exercise
But we know that this is not the case. The problem for me is the lack of a native language, so I'd rather use a browser, or rather my utility, which generates a request for the browser and opens the description in my native language.

Updated it again

Code: Select all

function parameters <TD>
(?im)<TD\h*?width=(\d+)%><B>([a-zA-Z_\*\h]+?)</B>\h*?<I>(\w+?)</I>(<B>,</B>)?\h*?</TD>
<TD width=\1%><font class="type">\2</font> <font class="prm">\3</font><font class="red">\4</font></TD>

comma correction
<font class="red"><B>,</B></font>
<font class="red">,</font>

function parameters in <P>
<P>([A-Z]+)(\h+?)((?i)[a-z]+)(;\h)</P>
<P><font class="type">\1</font>\2<font class="prm">\3</font>\4</P>

closing );
<TD width=(\d+)%>\h*?<B>\h*?\);</B>\h*?</TD>
<TD width=\1%><font class="red">);</font></TD>

function name (
(?mi)<P><B>([A-Z_]+?)\h+?(\w+)\(</B></P>
<P><font class="type">\1</font> <font class="fnk">\2</font><font class="red">(</font></P>

the name of a function with two types
(?mi)<P><B>([A-Z_]+?\h+?[A-Z_]+?)\h+?(\w+)\(</B></P>
<P><font class="type">\1</font> <font class="fnk">\2</font><font class="red">(</font></P>


function name {
(?mi)<P>([A-Z]+) ([A-Z]+)\h*?\{\h*?</P>
<P><font class="type">\1</font> <font class="fnk">\2</font> <font class="red">{</font></P>

closing };
(?mi)<P>\h*?};\h*?</P>
<P><font class="red">};</font></P>

more parameters
<p><i>([^\r\n<>]+?)</i></p>
<p class="prm">\1</p>

highlights the main function in the description
(?s)<TITLE>(\w+)</TITLE>(.+?)<B>(\h*?)\1(\h*?)</B>
<TITLE>\1</TITLE>\2\3<font class="fnk">\1</font>\4
Post Reply