PowerPhotos Help
AppleScript Command - count
Return the number of elements of a particular class within an object.
Syntax
count <specifier> [each <type>]
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| direct parameter | specifier | yes | The objects to be counted. |
| each | type | no | The class of objects to count. |
Result
integer – the number of matching elements.
Example
tell application "PowerPhotos"
set libraryCount to count libraries
set theLibrary to first library
set albumCount to count albums of theLibrary
set theAlbum to first album of theLibrary
set photoCount to count photos of theAlbum
display dialog "Libraries: " & libraryCount & return & ¬
"Albums in first library: " & albumCount & return & ¬
"Photos in first album: " & photoCount
end tell