On May 24, 2013, at 2:55 PM, John Dunsmuir wrote:
> I'm adding help resources to some macros and plugins.
>
> In macros
>
> dir = getDirectory("plugins");
> dir = replace(dir,"\\","/");
> myURL="file:///"+dir+"FloodFill/FloodFillHelp/FloodFill_Connectivity_Scan.htm";
>
> works OK but I don't know how to fix the pesky backslashes in a plugin. Hard coding the path works but isn't an option for me.
It would be better to inline the HTML help, as in the example at
http://imagej.nih.gov/ij/macros/examples/DialogWithHelp.txtWith plugins, the HTML file can be stored in a jar file along with the plugin. The example at
http://imagej.nih.gov/ij/plugins/pcl-demo.htmldemonstrates how resources needed by a plugin, such as text files, can be loaded from a jar file.
-wayne
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html