Fat Cat Software

PowerPhotos Help

AppleScript Object - photo

A single photo in a Photos library. Provides access to the photo’s metadata including its title, filename, keywords, GPS coordinates, and more.

Properties

Property Type Access Description
name text r/w The title of the photo.
filename text r/o The original filename of the photo.
keywords text list r/w The keywords assigned to the photo.
caption text r/w The caption (description) of the photo.
uuid text r/o The unique identifier of the photo.
date date r/w The date the photo was taken.
latitude real r/o The GPS latitude of the photo (-90 to 90). A value of MAXFLOAT indicates no GPS data.
longitude real r/o The GPS longitude of the photo (-180 to 180). A value of MAXFLOAT indicates no GPS data.
favorite boolean r/w Whether the photo is marked as a favorite.
hidden boolean r/o Whether the photo is hidden.

Responds To

Command Description
export Exports this photo to disk.

Example

tell application "PowerPhotos"
	set lib to first library
	set thePhotos to photos 1 through 10 of lib
	repeat with aPhoto in thePhotos
		set photoName to name of aPhoto
		set photoDate to date of aPhoto
		set photoKeywords to keywords of aPhoto
		log "Photo: " & photoName & " — Date: " & (photoDate as text) & " — Keywords: " & (photoKeywords as text)
	end repeat
end tell