AppleScript Support

Reveal has AppleScript support for refreshing application snapshots and other functionality.

For a full list of AppleScript commands and classes, see the Reveal entry in the AppleScript Editor Dictionary (AppleScript Editor>File>Open Dictionary... or Command-Shift-O).

Example AppleScript to refresh application snapshot.

tell application "Reveal"

    -- Activate the application

    -- We can check that the running Reveal instance has an active document. We
    -- do this because it is possible to have Reveal running but not have a document
    -- window up. Eg, have opened the preferences but closed the document window.
    if (count of documents) > 0 then

        -- We can check if the document has a selected service
        if (selected service of document 1) is not missing value then

            -- We can immediately refresh the active document since we have a selected 
            -- remote Reveal Service.
            refresh document 1

        end if

    end if

end tell