
234
USING ROBOHELP HTML 9
Context-sensitive Help
Last updated 12/14/2011
Note:
In the following examples, the API shares the same parameters regardless of output type. The only change made
is the location of the Help file.
WebHelp/FlashHelp
Stores the full path to the start page and a dialog name in a string variable called
StrPathAndWindow. An example of this string is "C:\Program
Files\MyApplication\WebHelp\MyStartPage.htm>MyWindow.”
WebHelp Pro
Stores the full path to the server and a window name in a string variable called StrPathAndWindow.
Check with the web administrator to determine whether the project name is required. (The project name is
required if the Auto-Merge option in the RoboHelp Server Configuration Manager is set to Off.)
An example of this string is
http://<servername>/robohelp/rest/search?project=<project-
name>&quesn=<search-query>
HTML Help
Stores the full path to the CHM file and a dialog name in a string variable called StrPathAndWindow.
An example of this string is “C:\Program Files\MyApplication\MyHelp.chm>MyWindow.”
Do not hard-code the string variable StrPathAndWindow.
7
To call a Help topic, call the function
RH_ShowHelp
with
a_pszHelpFile
set to
StrPathAndWindow
,
uCommand
set
to
HH_HELP_CONTEXT
, and
dwData
set to the map ID of the topic.
RH_ShowHelp syntax
RH_ShowHelp syntax
RH_ShowHelp(hParent As Long, a_pszHelpFile As String, uCommand As Long, dwData as Long) As
Boolean
Example:
To open the topic mapped to number 1:
Public cshObject as new RoboHelp_CSH .RH_ShowHelp Me.HWND, StrPathAndWindow,
cshObject.HH_HELP_CONTEXT, 1;
Notes:
•
In WebHelp Pro projects, the new context-sensitive Help API is supported only with RoboHelp Server.
•
Create one global RoboHelp_CSH object to use for all context-sensitive Help calls.
Airplane Help for Visual Basic applications
If using Airplane Help, associate offline Help before making function calls.
Syntax
Public Function RH_AssociateOfflineHelp(pszPrimaryHelpSource As String, pszBackupHelpSource As
String) As Boolean
Example
strOnline = "http:// www.mycompany.com/roboapi.asp?project=myproject"
strOffline = "C:\Program Files\My App\WebHelp\StartPage.htm"
Public cshObject as new RoboHelp_CSH ' Should be global object
cshObject. RH_AssociateOfflineHelp strOnline, strOffline