Here is a list of changes to AppleScript in OmniOutliner 4. If you’re looking for help with scripting, our forums are a great place to connect with other users.
-
The name of the app is now always
OmniOutlinerinstead ofOmniOutlinerfor Standard andOmniOutliner Professional. Alternatively, you can target the app with the new bundle identifier, e.g.tell app id "com.omnigroup.OmniOutliner4 ...Scripts that were previously targeting
OmniOutliner Professionalwill need to be recompiled. -
AppleScript is supported only with a OmniOutliner Professional license from the Omni Store or with the OmniOutliner Professional in-app purchase from the Mac App Store.
-
Our rich text class is now called
rich textinstead oftext, matching other applications on the system. Compiled scripts should continue to work. The AE code is now'OSrt'with an synonym ofctxt. Other apps do other things; some examples:Compact-list
- Acorn
rich text/'ctxt' - Adium
rich text/'ricT' - Aperture
rich text/'ctxt' - AppleScriptKit.framework
rich text/'ricT' - iChat
rich text/'rtfx' - FastScripts.app
rich text/'ctxt' - Mail
rich text/'ctxt' - PDFpen
rich text/'ctxt' - OmniPlan
rich text/'ctxt' - OmniFocus
rich text/'ctxt' - Script Debugger.app
rich text/'ricT' - Scrivener
rich text/'ctxt' - TextEdit uses
scriptSuite/scriptTerminologyand ends up withtext/'ctxt' - VoodooPad
rich text/'rtfx' - Xcode.app
rich text/'ricT'
- Acorn
-
The
column typeenumeration now has astyled textname for the'Oct0'code instead ofrich text(to avoid conflicting with the renamed rich text class). Compiled scripts should continue to work. -
In order to work with application sandboxing,
POSIX filemust be used for saving instead of HFS paths. -
Previously, saving to “/foo/bar.ext” would append a default file extension (
oo3for example). But, thesavecommand sends a sandbox exception to OmniOutliner and OmniOutliner cannot change the save destination to a location to which it wasn’t granted access. -
The
typeproperty oncolumnis nowcolumn type. Compiled scripts should continue to work. -
The
datemember of thecolumn typeenumeration is nowdatetime. Compiled scripts should continue to work. -
The
numbermember of thecolumn typeenumeration is nownumeric. Compiled scripts should continue to work. -
The
format stringofnumericanddatetimecolumns is specified via the ICU systems supported by macOS:Compact-list
-
The
formatproperty on columns is now a defined record type calledcolumn format(but with the same code). -
The
column formatproperty ofdatetimecolumns will no longer have aallowsNaturalLanguagekey. -
The
formatkey of thecolumn formatrecord corresponds to theformat stringconvenience property and will be an ICU format, as above. -
The
identifierproperty on thecolumn formatrecord is currently write-only. That is, you can doset column format of MyColumn to {id:"http"}to set adatetimecolumn to report HTTP formatted dates. Supported identifiers are currently:Compact-list
httptimestampiso8601.localiso8601.utc
-
Setting a
columnsformat stringtoshort-date-formatorlong-date-formatis no longer supported. Theformatrecord should be used instead. -
The
column formatrecord fordatetimecolumns contains the keysid,format,calendar,locale, andtimezone. -
The
column formatrecord fornumericcolumns contains the keysid,format, andcurrency(only if theidis"currency"). The valid values foridare:Compact-list
"thousands-with-decimal""no-thousands-with-decimal""no-thousands-no-decimal""percent-with-decimal""percent-no-decimal""currency"
-
The
valueofcells forcheckboxcolumns can be set using thecheckbox stateenumeration instead of via strings (strings will continue to work, though). -
The long-deprecated plain text column type has been removed from AppleScript (it has mapped to the rich text column type for a long time).
-
Added
name-based lookups forrows. -
Attempting to
selecta group of objects of different types will now return an error rather than using only objects of the first type. For example,select {row 1, column 1}previously would select the row and ignore the column. -
The
expandAllandcollapseAllcommands work on individual row trees as well as on the whole document -
The
nameofdocuments is now the diplay name instead of the last path component (including the path extension). This means that name based lookups need to not include the path extension. Additionally, name based lookups are case- and diacritical-insensitive. -
In OmniOutliner 3, the hoisted rows were not visible in the content area, and their
visibleproperty reflected that. In OmniOutliner 4, the hoisted rows are visible in the content area and theirvisibleproperty reflects this. -
A new
file attachmentclass has been added with afile nameproperty, which must be aPOSIX file. This copies the source file inside the OmniOutliner document as a new attachment. File attachments also handle thesavecommand to get their contents back out. -
The
autosave intervalproperty ondocumenthas been removed. -
Sort orderings set on
columnsare non-destructive. Only the view is changed. This means thatrowsvended by AppleScript may not be in the same order as they appear on screen. -
Added the
pbcopy,pbpasteandpbsavecommands to copy rows to and from the pasteboard. -
The
valueproperty on theattributeclass now returns ageneric colorrecord for color-typed attributes. This is a record with specific components, including alpha (with numeric components ranging from 0 to 1). -
The ‘regexp’ argument of the ‘replace’ command has been named ‘regular expression’ and given a new type code so that old scripts using that form will neither compile or execute. The format of this regular expression is now based off the ICU syntax used by Apple’s frameworks.