
249
USING ROBOHELP HTML 9
Context-sensitive Help
Last updated 12/14/2011
Display content
An ASP file is included for viewing content. The default hyperlink is http://<RoboHelp Server>/Roboapi.Asp. You can
pass a parameter to the ASP file:
•
project=Project_Name
•
context=MapNumber
•
url=URL
For example:
•
This URL displays default content from the server: http://<RoboHelp Server>/Roboapi.Asp
•
This URL displays the project_name project (merged with any other projects): http://<RoboHelp
Server>/robohelp/rest/search?project=<project-name>&quesn=<search-query>
•
This URL displays content for map number 101: http://<RoboHelp Server>/
/robohelp/rest/robowindow?wtype=ctx&context=<id>&project=<project name>
Advanced window control
When opening context-sensitive WebHelp Pro from a browser, use the context-sensitive Help API and support files.
WebHelp
Context-sensitive Help for Visual Basic applications
Use this information to connect context-sensitive WebHelp or WebHelp Pro topics to Visual Basic applications.
The sample code here uses a function called
Showhelp
that opens a local or remote topic regardless of the browser type.
The
ShowHelp
function has two parameters:
strTopic
takes a URL or local filename as a value, and
bIsLocal
takes
a Boolean value. It indicates whether the first parameter is a local filename (
TRUE
) or remote URL (
FALSE
). If the file
is local,
ShowHelp
tells the browser to find the file in the Help subfolder of the application folder.
Public Function ShowHelp(strTopic As String, _
bIsLocal As Boolean) As Boolean
Dim strDir As String
If bIsLocal Then
' Get registry entry pointing to Help
strDir = App.Path + "\Help\"
End If
' Launch topic
Dim hinst As Long
hinst = ShellExecute(Me.hwnd, vbNullString, _
strTopic, vbNullString, _
strDir, SW_SHOWNORMAL)
' Handle less than 32 indicates failure
ShowHelp = hinst > 32
End Function
To call
ShellExecute
, declare the function. For example:
Содержание 65030089 - Robohelp - PC
Страница 1: ...Using ADOBE ROBOHELP HTML 9...