
Adobe Photoshop CS3
JavaScript Scripting Reference
JavaScript Object Reference 85
CountItems
The collection of
CountItem
objects in the document. See
CountItem
.
Note:
CountItem
is available in the Extended Version only.
Because the
CountItems
class is also a property of the
Document
object, you use the property
name,
countItems
, rather than the class name,
CountItems
, in your code. For example:
docRef.countItems.removeAll()
The following sample uses the
CountItems
object incorrectly:
docRef.CountItems.removeAll()
Properties
Methods
Property
Value Type
What it is
length
number (long)
Read-only. The number of elements in the
CountItems
collection.
parent
object (
Document
)
Read-only. The
CountItems
object’s container.
typename
string
Read-only. The class name of the referenced
CountItems
object.
Method
Parameter Type
Returns
What it does
index
(itemKey)
number
CountItem
Gets an element from the
CountItems
collection.
add
(position)
array of UnitValue
CountItem
Creates a new
CountItem
object.
Parameter
position
(x,y) represents
the horizontal and vertical positions,
respectively, of the
CountItem
object.
Note:
For information about the
UnitValue
object, see the
JavaScript Tools Guide
getByName
(name)
string
CountItem
Get the first element in the
CountItems
collection with the
provided name.
removeAll
()
Removes all
CountItem
objects from
the
CountItems
collection
.