Text Items

When it comes to presentations, distilled well-placed evocative terms and phrases act as essential guides for a viewer to understand and comprehend the principles and concepts being displayed. And with the exception of a few relevant quotes, a slide’s supporting text snippets are often best kept short. The basic rule to follow when composing slide text is this:

Concept on the slide, content from you.

The scripting support in the Keynote dictionary for text items delivers most of what is required to create great slide designs and presentations.

Keynote Scripting Terminology for Text Items

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, audio clips, and text items. 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  [inh. iWork item ] : An item which supports formatting.

elements

contained by slides, document.

properties

heightinteger ) : The height of the iWork item.

lockedboolean ) : Whether the object is locked.

parentiWork container r/o ) : The iWork container containing this iWork item.

positionpoint ) : The horizontal and vertical coordinates of the top left point of the iWork item.

widthinteger ) : 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 text item, 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 a text item are detailed in its dictionary listing, found in the iWork Suite:  (⬇ see below ) 

The iWork Suite text item Class

text item  [inh. iWork item ] : An text container.

elements

contained by slides, document.

properties

background fill typeno fill/‌color fill/‌gradient fill/‌advanced gradient fill/‌image fill/‌advanced image fill, r/o ) : The background, if any, for the text item. NOTE: The value of this property is currently read-only and cannot be changed by a script.

object textrich text ) : The text contained within the text item.

opacityinteger ) : The opacity of the text item container, in percent (0 to 100).

reflection showingboolean ) : Is the text item displaying a reflection?

reflection valueinteger ) : The percentage of reflection of the text item, from 0 (none) to 100 (full).

rotationinteger ) : The rotation of the text item item, in degrees from 0 to 359.

responds to

delete, exists, make

The object text property is used to control the contents of a text item, and will be covered in detail in this section.

NOTE: A text alignment property is not yet implemented in the current scripting dictionary.

TOP | CONTINUE