For Programmers: Free Programming Magazines  


Home > Archive > APL > December 2005 > APL PLUS II & Windows Help files









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author APL PLUS II & Windows Help files
Charles Brenner

2005-12-16, 6:56 pm

Can I open a Windows help file (*.hlp or *.chm) from my DOS version of
APL (APL PLUS II, version 5)? How?

For some years I maintained a help file using the APL PLUS native help
mechanism but it is clumsy enough -- even with a few personal tools
that I wrote -- that in fact I've not found the energy to add to it for
a year. Eventually I'll migrate the whole application to Windows APL,
and as part of that migration I've lately been exploring the Windows
help mechanism. It just occurred to me that it would be nice both for
me and for the users if the Windows help file could be used from the
DOS product in the meanwhile.

Thanks for any tips.

Charles

AA2e72E

2005-12-16, 6:56 pm

The Windows API call for HLP files is:

Declare Function WinHelp Lib "user32" Alias "WinHelpA" (ByVal hwnd As
Long, ByVal lpHelpFile As String, ByVal wCommand As Long, ByVal dwData As
Long) As Long

The one for CHM files is:

Declare Function HtmlHelp Lib "hhctrl.ocx" Alias "HtmlHelpA" (ByVal
hwndCaller As Long, ByVal pszFile As String, ByVal uCommand As Long, ByVal
dwData As Long) As Long

I don't think you can make API calls from DOS. You would need a purpose
built EXE (perhaps using VB) that can make these calls. You would supply
the topic (context id) to show on invocation in the command line of the
EXE. You would call the EXE using the []CMD function in APL*PLUS/II.

Most help compilers can produce both HLP and CHM files. So, you might
consider giving your users a choice as to which format they prefer.

The APL*PLUS/II help file can be translated fairly easily i.e you can
extract the text and write to a text file and include the text file in the
help compiler.

There is a free (subject to EULA) tool (HTML Help) from Microsoft: if you
haven't got a help compiler and don't want to buy one, you might want to
make do with HLTM Help-it will do although it is very basic.

kevin@modelfitness.com

2005-12-16, 6:56 pm

Charles,
Tried e-mailing you at what I thought was your e-mail address, but
never heard from you.
Did you get an e-mail? More to the point, did you get a letter (snail
mail) from me after the converence? -- Kevin (kevin@modelfitness.com).
Charles Brenner wrote:
> Can I open a Windows help file (*.hlp or *.chm) from my DOS version of
> APL (APL PLUS II, version 5)? How?
>
> For some years I maintained a help file using the APL PLUS native help
> mechanism but it is clumsy enough -- even with a few personal tools
> that I wrote -- that in fact I've not found the energy to add to it for
> a year. Eventually I'll migrate the whole application to Windows APL,
> and as part of that migration I've lately been exploring the Windows
> help mechanism. It just occurred to me that it would be nice both for
> me and for the users if the Windows help file could be used from the
> DOS product in the meanwhile.
>
> Thanks for any tips.
>
> Charles


Charles Brenner

2005-12-17, 6:56 pm


AA2e72E wrote:
[excellent details omitted]

> I don't think you can make API calls from DOS. You would need a purpose
> built EXE (perhaps using VB) that can make these calls.


I have VB via Excel, but I've never used it. Would that version let me
create an .EXE?

> There is a free (subject to EULA) tool (HTML Help) from Microsoft: if you
> haven't got a help compiler and don't want to buy one, you might want to
> make do with HLTM Help-it will do although it is very basic.


Thanks. I am evaluating a tool called HelpScribble, which seems pretty
friendly and comprehensive. In order to compile to .chm I've installed
the MS tool but so far that is a roadblock (compiling to .hlp with a
different compiler works ok).

Charles

AA2e72E

2005-12-18, 3:55 am

Unfortunately, Excel, i.e VBA, does not create EXEs.
I no longer have APL*PLUS/II: I think it has the system function []na and
that might let you call the APIs.

Musashi

2005-12-18, 6:56 pm

Probably yes, so long as you can call a dos app from APl Plus ll.

Years ago, I used Microsoft Word to build help files.

You build the helps in RTF format and then embed
a link directly in the file to handle underlined links in the help.
I've forgotten the details but surely the info is out on the
web somewhere.

Once you have your helps built, you should be able to
then call a dos batch file or even the help engine itself
directly from your APL Plus. Or use file association
feature of windows which will automatically start a help
engine when you type a file with the "hlp" file extension.
See below.

So long as the help engine has the chm or hlp or whatever
the windows help extension file association is, it should
then automatically start up and display the help.

(Note: file associations are just internal links which tell
windows to start a certain app if the user double clicks on
an icon with a specific file extension. For example, if I click
on SomeRpt.DOC, the extension ".DOC" tells windows that
the Microsoft Word should start automatically and load this file.

Unknown to some people, you can also just type the file
name from a dos box and once again the file association will
activate the appropriate program. It is this feature which
I hope will solve your problem.

Just an idea.

Jim Pannozzi (aka Jimserac, Takuon Soho, Musashi)


"Charles Brenner" <cbrenner@uclink.berkeley.edu> wrote in message
news:1134751705.983719.49580@g43g2000cwa.googlegroups.com...
> Can I open a Windows help file (*.hlp or *.chm) from my DOS version of
> APL (APL PLUS II, version 5)? How?
>
> For some years I maintained a help file using the APL PLUS native help
> mechanism but it is clumsy enough -- even with a few personal tools
> that I wrote -- that in fact I've not found the energy to add to it for
> a year. Eventually I'll migrate the whole application to Windows APL,
> and as part of that migration I've lately been exploring the Windows
> help mechanism. It just occurred to me that it would be nice both for
> me and for the users if the Windows help file could be used from the
> DOS product in the meanwhile.
>
> Thanks for any tips.
>
> Charles
>



Charles Brenner

2005-12-18, 6:56 pm


Musashi wrote:
> Probably yes, so long as you can call a dos app from APl Plus ll.


> Unknown to some people, you can also just type the file
> name from a dos box and once again the file association will
> activate the appropriate program. It is this feature which
> I hope will solve your problem.
>
> Just an idea.


A good one. Of course I am not among the unsophisticates who don't know
that file associations work when typing the file name from a DOS box. I
was until I read your message and tried it out, but not any more.

So
[c:helpdir\] myhelpfile.hlp
works -- opens the file to the table of contents, and I can also write
a batch file that works in the same way.

[]CMD 'myhelpfile.hlp' from APL does not work, nor does trying to run
a batch file in this way. I also tried "shell" and "Start" and
"command.com /C myhelpfile.hlp" without success.

However, I think I can write a small executable using C to run the
batch file, and can of course also try "running" the .hlp file
directly. If so the []cmd can surely run the executable. Probably I can
even find a solution with []NA -- faster and perhaps less fragile than
[]cmd -- that way.

Thanks very much.

Charles

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com