Programming with Reflection
WaitEventNumber method
Syntax object.WaitEventNumber Event, TimeOut
Waits for the occurrence of the specified event, defined with the DefineEvent method. The procedure containing the command is paused until the wait expires or is satisfied.
Event Argument type: Integer
The event for which to check. The event number is assigned by the Event argument of DefineEvent.
TimeOut Argument type: String
Specifies an interval of time in HH:MM:SS format. If this interval elapses before the specified event occurs, an error is returned.
Note: When a wait is satisfied, the event status is reset. Until the event is removed (using RemoveEvent or ClearEvents), it will be satisfied again after this point when the conditions of the defined event have once again been met.