HelpString class

The HelpString class represents a help string shown in !help.
Hex.HelpString(iSection, sLanguage) returns a new object of type HelpString.

The HelpString class is initialized with two parameters:

The help string will only remain registered with the hub (visible to users), as long as the HelpString object you created is valid.
Once the object gets collected by the lua garbage collector then the help string will automatically be unregistered.

Remarks:
In HeXHub version 5.02c or higher a new section was added to the !help trigger.
The new section 7 is different from section 0 thru 6. Section 7 requires the section name to be prepended to the helpstring. The section name is terminated by a new line (
). This document provides two lua code samples: Lua script sample 2: Registering a helpstring in to section 7. and Lua script sample 1: Registering a helpstring in to section 0 thru 6.

Hex Script versions < 1.2.0.0:
If the section given by the script is non-existing (not 0-6) then section 0 will be used.

Hex Script versions >= 1.2.0.0:
If the section giving by the script is non-existing (not 0-7) then a user defined section named "Hex Script" will be used.
If the script registers a helpstring for section 7 and it did not include the section name followed by a new line char then a user defined section named "Hex Script" will be used.

HelpString:SetString(sHelpString)

This function adds (or changes a prev. string) to the hubs !help menu.

Hex Script versions < 1.2.0.1:
This function does not return a value
Hex Script versions >= 1.2.0.1:
This function returns false on error, and true on success.

Parameters:

Lua script sample 1: Registering a helpstring in to section 0 thru 6.

The following sample illustates how to register a help string in to section 0-6

	hlpstr = Hex.HelpString(2, "EN")
	hlpstr:SetString("!trigger\t\t-\tdescription...")

Lua script sample 2: Registering a helpstring in to section 7.

The following sample illustrates how to register a help string in to section 7 (user defined section)


	hlpstr = Hex.HelpString(7, "EN")
	hlpstr:SetString("My Section Name\n!trigger\t\t-\tdescription...")

Generated on Sat Aug 22 21:09:31 2009 for Hex Script by  doxygen 1.5.8