Public Function TriggerUI(trigger_string As String) As String
When HS builds the event properties for an event, it will call this function to get some information about what trigger the plug-in supports, as well as what types of controls the plug-in wishes to present the user. Since the controls are presented in a scrolling window, there is no limit to the number of controls you can display. This function returns a formatted string of VbTab (tab character) separated values that represents this information.
When the triggers are being displayed in the HS event properties and on the web page, the currently configured trigger string is passed to this function.
The format of the string is:
Parameter 0: Trigger name
This is a string that will be appended to the trigger type list. (e.g. "Widget Trigger")
Paramerter 1: Control type
This indicates the type of control to display. The following types are available:
UI_DROP_LIST = a drop down list of any number of entries
UI_TEXT_BOX = a textbox for text entry. Set as multiline, displays one line
UI_CHECK_BOX = a single check box
UI_LABEL = a text label. Does not hold a value but is useful to segregate sections of controls. It may also hold HTML for use on the web page.
Paremeter 2: Attributes
This is a bit field that is used to alter the display of the control in some manner.
If "1", control may not be edited by the user
Parameter 3: Control label
A text label that labels the control. This label may contain HTML for better formatting on the web page.
Parameter 4: VbTab separated list of control values.
For the drop list control, each entry is added as a new selection to the control. There is no limit to the number of entries you may add.
Last Parameter: VbCr (carriage return character)
The “VbCr” character terminates the definition of this control. More controls may be added after this terminator.
Next Parameter after VbCR: empty string
Next+1: empty string
Next+2: Control type, repeat parameters as in parameter 1 above.
Example. The following string creates a new trigger named “Panel Trigger”, and adds 3 controls, 2 drop down lists and a text box:
After the user makes his selections for the trigger, a trigger string is built and saved in the HS config file for the specific event. This string is used by HS to determine if a trigger occurs. Your plug-in will call the callback function CheckTrigger(trigstr) when an event occurs. See the CheckTrigger function for more information. This trigger string is also passed to the TriggerUIFormat() function when HS needs to display information about this
trigger. Normally this is done in the event list on the web page.
To have several trigger types within one plug-in, separate the trigger type groups with Chr(1), the plug-in name, and a vbTab. See the above code for an example.
Special Attribute Functions
In version 1.6.139 and later, special characters may be added to the attribute parameter of a control to change the behavior of that control in the ActionUI and TriggerUI screens. Read more about those here.
Drop List Separate Name/Value Option