NewEventEx

Purpose

This function creates a new empty event.  The trigger mode is set to MANUAL and the event is DISABLED.  All other properties are cleared and the name is set to the name given.  The EventClass object reference to the new event is returned and may be used in a script to set properties of the new event.

Parameters

Parameter: name
Type: string
Description: This is the name of the new event.

Returns

Return value: event reference
Type: EventClass object
Description: This is the object reference to the event class properties.

Example

This example creates a new event, sets the event group name to "System", and then displays the event name as read from the event properties.

sub new_event(name)

dim ev

set ev=hs.NewEventEx(name)

ev.group = "System"
msgbox ev.name

end sub