The MacOS.AEColl object represents a collection of elements within the
target application. Instances of MacOS.AEColl are returned by properties
of the MacOS.AEClass. MacOS.AEColl is
a JavaScript array object that can be accessed by index (corresponding
to the AppleScript by-index key form) or by string (corresponding to the
AppleScript by-name) key form.
| Method/Property |
Description |
| MacOS.AEColl.length |
sends a Count AppleEvent to the application returning
the number of elements in the collection
|
| MacOS.AEColl.every |
returns a MacOS.AEClass
object referring to all the elements of the collection
|
| MacOS.AEColl.first |
returns a MacOS.AEClass
object referring to the first element in the collection
|
| MacOS.AEColl.last |
returns a MacOS.AEClass
object referring to the last element in the collection
|
| MacOS.AEColl.middle |
returns a MacOS.AEClass
object referring to the middle element in the collection
|
| MacOS.AEColl.any |
returns a MacOS.AEClass
object referring to a random element in the collection
|
| MacOS.AEColl.beginning |
returns a MacOS.AEClass
object representing an insertion location at the beginning of the
collection
|
MacOS.AEColl.atBeginning
MacOS.AEColl.toBeginning |
returns an instance of MacOS.AEDesc
containing an insertion location suitable for use with the at parameter
of make, copy, duplicate and move events
|
| MacOS.AEColl.end |
returns a MacOS.AEClass
object representing an insertion location at the end of the collection
|
MacOS.AEColl.atEnd
MacOS.AEColl.toEnd |
returns an instance of MacOS.AEDesc
containing an insertion location suitable for use with the at parameter
of make, copy, duplicate and move events
|
| MacOS.AEColl.byID(idValue) |
returns a MacOS.AEClass
object referring to an element keyed by unique ID
|
| MacOS.AEColl.byRange
(loBound, hiBound) |
returns a MacOS.AEClass
object referring to a range of elements within the collection
NOTE: indexes are 1-based
|
The following example shows MacOS.AEColl in use enumerating the files
on the MacOS Finder's desktop.