Program Help for Java applications

This information is for developers connecting context-sensitive Help topics to Java applications.

1)Open the project in your Java IDE (integrated development environment).

2)Add RoboHelp_csh.java to the project.

3)Call the function defined in RoboHelp_csh.java using any needed parameters.

note:   Airplane Help is not supported in the Java API.

Function calls from Java applications

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.

 public static boolean RH_ShowHelp(int hParent, String a_pszHelpFile, int uCommand, int
dwData)

Parameter

Data Type

Description

hParent

int

Reserved for future versions. Use 0.

a_pszHelpFile

String

Help source For Webhelp/FlashHelp: "<Path to project start page>" For WebHelp Pro: "http://[ServerName]/roboapi.asp"

*Optional: Specify dialogs using ">WindowName" at the end of this parameter

uCommand

int

Constants:

HH_DISPLAY_INDEX Displays Index pane and default topic.

HH_DISPLAY_SEARCH Displays Search pane and default topic.

HH_DISPLAY_TOC Displays Contents pane and default topic.

HH_HELP_CONTEXT Opens topic associated with map ID in dwData parameter.

dwData

int

Topic map ID (defined in Edit Map IDs in RoboHelp). To obtain the map ID, export the map file for your language (use HH_HELP_CONTEXT in the uCommand parameter).

tip:   To launch the Help system (open to the default topic), make a Help call that sets uCommand to HH_DISPLAY_INDEX, HH_DISPLAY_SEARCH, or HH_DISPLAY_TOC, and dwData to "0". In WebHelp Pro systems, default window settings for default navigation button override the HH_DISPLAY constant (however, the Help system still opens to the default topic).

Call a context-sensitive function for Multiscreen/Responsive HTML5, WebHelp, FlashHelp, or FlashHelp Pro

1)Call the function.

     RoboHelp_CSH.RH_ShowHelp(0, StrPathAndWindow, RoboHelp_csh.HH_HELP_CONTEXT, 1);

Where the full path to the WebHelp/FlashHelp start page and a window name (optional) are stored in StrPathAndWindow. (Never hard code this string.)note:    "Do not hard-code" here suggests that it should be left as a variable which should be taken as input from the user in order for the code to be reusable, for opening different help files.

2)Run the application and test the Help call.

note:    If using Multiscreen or Responsive HTML5 Help, you can also use the functions RH_ShowMul­tiscreenHelpWithMapId andRH_ShowMultiscreenHelpWithMapNoto call HTML5 help topics using MapId and Map number, respectively. The source code and documentation for these func­tions is contained in the support file RoboHelp_CSH.java located at C:\Program Files\Adobe\Adobe RoboHelp [version]\CSH API\. You need to import this support file into your Java development project to use these functions.

Call a context-sensitive function for WebHelp Pro

1)Call the function.

     RoboHelp_CSH.RH_ShowHelp(0, StrPathAndWindow, RoboHelp_csh.HH_HELP_CONTEXT, 1);

Where the full path to the RoboHelp server and a dialog box name (optional) are stored in StrPathAndWindow. (The project name is required if the Auto-Merge option is set to Off in the RoboEngine Configuration Manager.) Examples of this value are “http://RoboHelp Server:port/robohelp/server” or “http://RoboHelp Server:port/robo­help/server?project=MyProject>MyWindow.”

To open the topic mapped as number 1:

     RoboHelp_CSH.RH_ShowHelp(0, StrPathAndWindow, RoboHelp_csh.HH_HELP_CONTEXT, 1);

2)Run the application and test the Help call.


September 30, 2016

Legal Notices | Online Privacy Policy