Add Method

image\btn_example.gif

image\validfor_amv.gif

Applies To Objects

Waits

Description

Used to add a wait-type object to an instance of a Waits collection object. See help for the Waits collection for more information on wait-type objects.

Syntax

id = object.Add(waitobj)

Element

Description

object

The Waits object.

waitobj

A wait-type object

id

Return value is the 1-based index location at which the object was added to the Waits collectionÂ’s internal list.

Comments

The Waits object is a collection object used to control and check on the status of number of "wait-type" objects. When used with the "Set" keyword, the following methods will immediately return a wait-type object, rather that waiting synchronously for their operations to complete:

 WaitHostQuiet

 WaitForString

 WaitForStream

 WaitForCursor

 WaitForCursorMove

 WaitForKeys

 WaitForDisconnect

 WaitForTimer

 SendFile

 ReceiveFile

 NavigateTo

After retrieving several wait-type objects using the above methods, use the Add method to add them to the Waits collection object. Then, through use of the Wait method, it is possible to simultaneously monitor the status of all the objects in the collection.