Programming with Reflection

image\rwnprg32.gif WaitEvent method

 

Syntax Event = object.WaitEvent(Timeout, [Options] )

 

Description

Waits for any of the defined events 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
Required
Specifies an interval of time in HH:MM:SS.hh format. If this interval elapses before any events occur, the method returns zero (0).

Options Argument type: Enumeration
Optional
Specifies additional, non-default behavior for the method. There is one option for this method:

 rcAllowKeystrokes

 Specifies that the user is allowed to enter keystrokes in the terminal window during the wait.

Return

Event Return type: Integer
Returns the number assigned (with DefineEvent) to an event that has occurred. If no events are satisfied before the timeout period elapses, the return value is 0.

 

Note: 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 Keyword Index

image\popup.gif Related Topics

image\popup.gif Reflection products that use this command