Programming with Reflection
WaitEvent method
Syntax Event = object.WaitEvent(Timeout)
Waits for the next defined event to occurevents are defined with the DefineEvent method. The procedure containing the command is paused until the wait expires or is satisfied.
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 occurs.
Event Return type: Integer
Returns the number assigned (with DefineEvent) to an event that has occurred.
When a wait is satisfied, the status of the event 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.
You can use WaitEventNumber to wait for a specific defined event.