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 event reference ID of the new event is returned and may be used in the GetEventByRef call to set properties of the new event.
Parameter: name
Type: string
Description: This is the name of the new event.
Return value: event
reference ID
Type: long (.NET Integer)
Description: This is the event reference
ID of the new event.
This example creates a new event and then gets the event name.
sub new_event(name)
dim i
dim ev
i=hs.NewEventGetRef(name)
set ev=hs.GetEventByRef(i)
msgbox ev.name
end sub