Documents created by any of the iWork applications, Pages, Numbers, or Keynote, can incorporate a common set of elements, including images, shapes, lines, tables, charts, movies, and audio clips. To AppleScript and the built-in scripting support of the iWork applications, these elements are considered iWork Items, and share a common set of properties, detailed in the iWork Item class from the iWork Suite:
The iWork Suite iWork item Class
iWork item n [inh. iWork item ] : An item which supports formatting.
elements
contained by slides, document.
properties
height ( integer ) : The height of the iWork item.
locked ( boolean ) : Whether the object is locked.
parent ( iWork container r/o ) : The iWork container containing this iWork item.
position ( point ) : The horizontal and vertical coordinates of the top left point of the iWork item.
width ( integer ) : The width of the iWork item.
responds to
delete, exists
The properties in the iWork item class can be accessed and changed for any of the common iWork elements. For example, a script can get or set the position of a movie, or image, or shape, or any of the common elements.
In addition to sharing a common set of properties with the other iWork elements, each iWork element has its own set of properties, particular to that element. For example, the element-specific properties of an audio clip are detailed in its dictionary listing, found in the iWork Suite: (⬇ see below )
The iWork Suite audio clip Class
audio clip n [inh. iWork item ] : An audio clip
elements
contained by slides, document.
properties
clip volume ( integer ) : The volume setting for the audio clip, from 0 (none) to 100 (full volume).
file name ( text r/o) : The name of the audio file.
repetition method ( none/loop/loop back and forth ) : If or how the audio clip repeats.
responds to
delete, exists
NOTE: In the current version of Keynote the audio clip class does not support the use of the make command. See the documentation (linked in sidebar) for details on how to import an audio clip.
The element-specific properties of a movie are detailed in its dictionary listing, found in the iWork Suite: (⬇ see below )
The iWork Suite movie Class
movie n [inh. iWork item ] : A movie on a slide in a document.
elements
contained by slides, document.
properties
file name ( text r/o) : The name of the movie file.
movie volume ( integer ) : The volume setting for the movie, from 0 (none) to 100 (full volume).
opacity ( integer ) : The opacity of the object, in percent.
reflection showing ( boolean ) : Is the movie displaying a reflection?
reflection value ( integer ) : The percentage of reflection of the movie, from 0 (none) to 100 (full).
repetition method ( none/loop/loop back and forth ) : If or how the audio clip repeats.
rotation ( integer ) : The rotation of the iWork item, in degrees from 0 to 359.
responds to
delete, exists
NOTE: In the current version of Keynote the movie class does not support the use of the make command. See the documentation (linked in sidebar) for details on how to import a movie.
The pages in this topic explore how to create and manipulate the iWork media items: movie and audio clip.