Control Deckset with AppleScript

Use AppleScript to control presentations and exports in Deckset for macOS. The first time another app or script controls Deckset, macOS may ask for permission.

Start, stop, or toggle a presentation

Use the front document as the command target:

tell application "Deckset"
    set deck to front document
    toggle presentation mode deck
end tell

You can also choose the state explicitly:

tell application "Deckset"
    set deck to front document

    if presenting of deck then
        stop presenting deck
    else
        present deck
    end if
end tell

presenting is a read-only Boolean property of a Deckset document. Use rehearse deck to enter Rehearsal Mode.

Switch the presenter display

When the presentation and presenter windows are on the wrong screens, switch them with:

tell application "Deckset"
    switch presenter display front document
end tell

Export an accessible PDF

The export command supports PDF, PNG, JPEG, and HTML. PDF exports are accessible PDF/UA-2 documents by default:

set destinationFile to POSIX file "/Users/me/Desktop/Quarterly Review.pdf"

tell application "Deckset"
    export front document to destinationFile as "PDF" ¬
        printAllSteps true ¬
        includePresenterNotes true ¬
        createAccessiblePDF true
end tell

Set createAccessiblePDF to false only when you intentionally want a standard PDF. The parameter is ignored for PNG, JPEG, and HTML exports.

If PDF validation fails, Deckset returns an error to the script and leaves the destination file alone. Scripted exports do not show the usual recovery choices, so fix the reported issue or retry with createAccessiblePDF false.

Export HTML (Beta)

Use the HTML export type to create an HTML document and its accompanying assets directory. Keep both together when moving or publishing the export.

set destinationFile to POSIX file "/Users/me/Desktop/Quarterly Review.html"

tell application "Deckset"
    export front document to destinationFile as "HTML" ¬
        printAllSteps true ¬
        includePresenterNotes false
end tell

printAllSteps exports every build stage instead of only the final state of each slide. Presenter notes are excluded unless includePresenterNotes is true. HTML validation errors stop the export and are returned to the script.