Programming with Reflection

image\rwnprg32.gif WaitEvent method

 

Syntax Event = object.WaitEvent(Timeout)

 

Description

Waits for the next defined event to occur—events are defined with the DefineEvent method. The procedure containing the command is paused until the wait expires or is satisfied.

Arguments

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.

Return

Event Return type: Integer
Returns the number assigned (with DefineEvent) to an event that has occurred.

Notes:

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.

 

image\jump.gif Example

image\jump.gif Keyword Index

image\popup.gif Related Topics

image\popup.gif Reflection products that use this command