The Keynote Application

The scripting terminology for the Keynote application class is spread across three suites in the Keynote dictionary:

The Standard Suite Application Class

application: [see also Keynote Suite, Compatibility Suite] : The application’s top-level scripting object.

elements

contains documents, windows.

properties

frontmostboolean r/o ) : Is this the active application?

nametext r/o ) : The name of the application.

versiontext r/o ) : The version number of the application.

responds to

open, exists, quit, print

The Keynote Suite Application Class

application: [see also Standard Suite, Compatibility Suite] : The Keynote application.

elements

contains themes

responds to

open, quit, print

The Keynote Compatibility Suite application class contains a set of commands for controlling the delivery of presentation documents:

The Keynote Compatibility Suite Application Class

application: [see also Standard Suite, Keynote Suite] : The Keynote application.

responds to

start slideshow, stop slideshow, show next, show previous, show slide switcher, cancel slide switcher, move slide switcher forward, move slide switcher backward, accept slide switcher.

Intrinsic and Hidden Properties

In addition to the three suites shown above, Keynote has intrinsic application properties shared by all applications. These properties can provide the application identifier and the activity state of an application (is the application open).

Also, as a very useful bonus, the Keynote dictionary contains a set of hidden properties, including one for indicating whether Keynote is presenting a document, and whether the slide switcher is visible or not:

Starting and Stopping Presentations

Using elements from the sources and methods shown above, the following script contains a statement for Keynote to stop presenting. This statement will only run if: 1) Keynote is currently launched and running; and 2) a presentation is currently playing:

And a script for presenting the front document. It will start the presentation only if Keynote is open with a document open:

TOP | CONTINUE