Studio:AutoScript Events: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 63: | Line 63: | ||
* the configured WaitTimeoutPeriod has elapsed | * the configured WaitTimeoutPeriod has elapsed | ||
|} | |} | ||
[[Category:Studio:AutoScript]] |
Latest revision as of 16:09, 21 August 2009
WaitForEvent
Syntax
ascript.WaitForEvent()
Return Value
The return value is an object popped off of the front of this script's event queue. The returned object can be any of the following types. Each returned type exposes both Type and Name properties so that a script can identify the object and take appropriate action.
Object |
Type |
Name |
Function.Owner Object | "FunctionOwner" | Function Name |
Function.User Object | "FunctionUser" | Function Name |
Message.Owner Object | "BroadcastMessageOwner" "OneWayMessageOwner" "OneWayResponseOwner" "TwoWayMessageOwner" |
Message Name |
Message.User Object | "BroadcastMessageOwner" "OneWayMessageOwner" "OneWayResponseOwner" "TwoWayMessageOwner" |
Message Name |
Timer Object | "Timer" | Timer Name |
Error Object (see Remarks) |
"Error" | "Host Error" "Target Error" "System Error" |
Remarks
- WaitForEvent() is used to provide synchronization between a script and the STRIDE Runtime when asynchronous calls are made. The synchronization is accomplished by creating a event queue for each ascript instance (typically each script has a single ascript instance). Events are pushed onto the back of the queue by the runtime, and they are popped off of the front of the queue using WaitForEvent().
- WaitForEvent() will block script execution until an event is available in the queue.
- You can test whether one or more events are pending in the queue by checking the IsEventPending Property.
- An Error object is returned under the following circumstances:
|