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
OmniOutliner
instead ofOmniOutliner
for 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 Professional
will 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 text
instead 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
/scriptTerminology
and ends up withtext
/'ctxt'
- VoodooPad
rich text
/'rtfx'
- Xcode.app
rich text
/'ricT'
- Acorn
-
The
column type
enumeration now has astyled text
name 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 file
must be used for saving instead of HFS paths. -
Previously, saving to “/foo/bar.ext” would append a default file extension (
oo3
for example). But, thesave
command sends a sandbox exception to OmniOutliner and OmniOutliner cannot change the save destination to a location to which it wasn’t granted access. -
The
type
property oncolumn
is nowcolumn type
. Compiled scripts should continue to work. -
The
date
member of thecolumn type
enumeration is nowdatetime
. Compiled scripts should continue to work. -
The
number
member of thecolumn type
enumeration is nownumeric
. Compiled scripts should continue to work. -
The
format string
ofnumeric
anddatetime
columns is specified via the ICU systems supported by macOS:Compact-list
-
The
format
property on columns is now a defined record type calledcolumn format
(but with the same code). -
The
column format
property ofdatetime
columns will no longer have aallowsNaturalLanguage
key. -
The
format
key of thecolumn format
record corresponds to theformat string
convenience property and will be an ICU format, as above. -
The
identifier
property on thecolumn format
record is currently write-only. That is, you can doset column format of MyColumn to {id:"http"}
to set adatetime
column to report HTTP formatted dates. Supported identifiers are currently:Compact-list
http
timestamp
iso8601.local
iso8601.utc
-
Setting a
column
sformat string
toshort-date-format
orlong-date-format
is no longer supported. Theformat
record should be used instead. -
The
column format
record fordatetime
columns contains the keysid
,format
,calendar
,locale
, andtimezone
. -
The
column format
record fornumeric
columns contains the keysid
,format
, andcurrency
(only if theid
is"currency"
). The valid values forid
are:Compact-list
"thousands-with-decimal"
"no-thousands-with-decimal"
"no-thousands-no-decimal"
"percent-with-decimal"
"percent-no-decimal"
"currency"
-
The
value
ofcell
s forcheckbox
columns can be set using thecheckbox state
enumeration 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 forrow
s. -
Attempting to
select
a 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
expandAll
andcollapseAll
commands work on individual row trees as well as on the whole document -
The
name
ofdocument
s 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
visible
property reflected that. In OmniOutliner 4, the hoisted rows are visible in the content area and theirvisible
property reflects this. -
A new
file attachment
class has been added with afile name
property, which must be aPOSIX file
. This copies the source file inside the OmniOutliner document as a new attachment. File attachments also handle thesave
command to get their contents back out. -
The
autosave interval
property ondocument
has been removed. -
Sort orderings set on
columns
are non-destructive. Only the view is changed. This means thatrows
vended by AppleScript may not be in the same order as they appear on screen. -
Added the
pbcopy
,pbpaste
andpbsave
commands to copy rows to and from the pasteboard. -
The
value
property on theattribute
class now returns ageneric color
record 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.