WinHelp

Description:

baWinHelp displays a windows Help file.

Platforms:

Windows

Usage:

Result = baWinHelp(Cmd, HelpFile, Data )

Arguments:

String, string, string.
Cmd is the help file command. Can be one of the following:

"Contents" 

shows the Contents page.

"Context" 

shows the page with the "Data" context number.

"PopUp" 

shows the page with the "Data" context number in a pop-up window.

"Show" 

shows the topic found that matches "Data" if there is one exact match. If there is more than one match, then the Search dialog box is displayed. If there is no exact match, then an error message will appear.

"Search" 

shows the topic found that matches "Data" if there is one exact match. If there is more than one match, then the Search dialog box is displayed. If there is no match, then the Search dialog box appears.

"Quit" 

closes the Help file.

"Help" 

shows the Help-On-Help page.

"Macro" 

executes the Help macro named in "Data".
HelpFile is the name of the Help file to display. This should include the complete path to the help file.
Data is a string containing extra information. This will vary according to the Cmd used. Note that even if a number is required, this must be passed as a string.

"Contents" 

Data should be "".

"Context" 

Data is the context number, eg "4".

"PopUp" 

Data is the context number, eg "4".

"Show" 

Data is the topic string to show, eg "About BudAPI".

"Search" 

Data is the topic string to search for, eg "About BudAPI".

"Quit" 

Data should be "".

"Help" 

Data should be "".

"Macro" 

Data should be the name of the macro to execute, eg "PlayMovie".

Returns:

Integer.
Returns 1 if successful, else 0. Not finding the Help file is not considered a failure.

Examples:

Director:
OK = WinHelp( "Show", the pathName & "myhelp.hlp", "Flowers" )
OK = WinHelp( "Quit", the pathName & "myhelp.hlp", "" )

Authorware:
OK := WinHelp( "Show", FileLocation ^ "myhelp.hlp", "Flowers" )
OK := WinHelp( "Quit", FileLocation ^ "myhelp.hlp", "" )
 

Notes:

This function only works with .hlp files. Note that support for .hlp files is not standard in Vista.