OmniOutliner & Omni Automation

OmniOutliner is a flexible program for creating, collecting, and organizing information. Whether you’re keeping track of tasks for a project or putting together an outline for a book or research paper, OmniOutliner has everything you need to get the details just right. The Professional Edition adds a full suite of styling, customization, and management tools to get your outlines looking just the way you want.

And with Omni Automation and OmniOutliner, you can streamline how you work, delivering enhanced productivity and creative uses of data and design.

The Application Object

In Omni Automation, the OmniOutliner application object has properties (name, version) and elements (documents, windows). In a script, the application object is represented as: app

If you entered just “app” in the OmniOutliner console window and executed the line, the result would be a reference to the application object:

To get the name of the OS the app is running on:

Properties: name

The value of the name property of the application object is a string representing the name of the OmniGraffle application.

The value of the application name property is read-only.

Properties: Key Down Properties

The following application properties can be used by scripts to determine if the standard modifier keys are pressed when the script is run:

Properties: version

The value of the version property of the application object is a string representing the version number of the OmniOutliner application.

The value of the application version property is read-only.

To create a new version object:

To extract the version string from a version object:

Comparing Versions

There are four methods you can use for comparing version objects:

Here are functions demonstrating their use:

function isBeforeCurVers(versStrToCheck){ curVersStr = app.version curVers = new Version(curVersStr) versToCheck = new Version(versStrToCheck) result = versToCheck.isBefore(curVers) console.log(versStrToCheck + ' is before ' + curVersStr + " = " + result) return result } function isEqualToCurVers(versStrToCheck){ curVersStr = app.version curVers = new Version(curVersStr) versToCheck = new Version(versStrToCheck) result = versToCheck.equals(curVers) console.log(versStrToCheck + ' equals ' + curVersStr + " = " + result) return result } function isAtLeastCurVers(versStrToCheck){ curVersStr = app.version curVers = new Version(curVersStr) versToCheck = new Version(versStrToCheck) result = versToCheck.atLeast(curVers) console.log(versStrToCheck + ' is at least ' + curVersStr + " = " + result) return result } function isAfterCurVers(versStrToCheck){ curVersStr = app.version curVers = new Version(curVersStr) versToCheck = new Version(versStrToCheck) result = versToCheck.isAfter(curVers) console.log(versStrToCheck + ' is after ' + curVersStr + " = " + result) return result }
UNDER CONSTRUCTION

This webpage is in the process of being developed. Any content may change and may not be accurate or complete at this time.

DISCLAIMER