Support Produced by OmniGraffle 7.5 test 2017-09-15 03:22:04 +0000 phone/email/twitter +1 206-523-4152 or 800-315-OMNI

Changes to AppleScript in OmniOutliner 4

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 OmniOutliner instead of OmniOutliner for Standard or OmniOutliner Professional. Alternatively, you can target the app with the new bundle identifier:

    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 of text, matching other applications on the system. Compiled scripts should continue to work. The AE code is now 'OSrt' with an synonym of ctxt. Other apps do other things:

    • Apple apps:

      • Xcode.app rich text/'ricT'
      • AppleScriptKit.framework rich text/'ricT'
      • iChat rich text/'rtfx'
      • Mail rich text/'ctxt'
      • Aperture rich text/'ctxt'
      • TextEdit uses scriptSuite/scriptTerminology and ends up with text/'ctxt'
    • AppleScript related apps:

      • Script Debugger.app rich text/'ricT'
      • FastScripts.app rich text/'ctxt'
    • Omni apps (already changed via OmniStyle.sdef):

      • OmniPlan rich text/'ctxt'
      • OmniFocus rich text/'ctxt'
    • Other apps:

      • Scrivener rich text/'ctxt'
      • PDFpen rich text/'ctxt'
      • VoodooPad rich text/'rtfx'
      • Adium rich text/'ricT'
      • Acorn rich text/'ctxt'
  • The column type enumeration now has a styled text name for the 'Oct0' code instead of rich 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, the save 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 on column is now column type. Compiled scripts should continue to work.

  • The date member of the column type enumeration is now datetime. Compiled scripts should continue to work.

  • The number member of the column type enumeration is now numeric. Compiled scripts should continue to work.

  • The format string of numeric and datetime columns is specified via the ICU systems supported by macOS.

  • ICU Date Formats
  • ICU Number Formats

  • The format property on columns is now a defined record type called column format (but with the same code).

  • The column format property of datetime columns will no longer have a allowsNaturalLanguage key.

  • The format key of the column format record corresponds to the format string convenience property and will be an ICU format, as above.

  • The identifier property on the column format record is currently write-only. That is, you can do:

    set column format of MyColumn to {id:"http"}

to set a datetime column to report HTTP formatted dates. Supported identifiers are currently http, timestamp, iso8601.local and iso8601.utc.

  • Setting a columns format string to short-date-format or long-date-format is no longer supported. The format record should be used instead.

  • The column format record for datetime columns contains the keys id, format, calendar, locale, and timezone.

  • The column format record for numeric columns contains the keys id, format, and currency (only if the id is "currency"). The valid values for id are:

  • "thousands-with-decimal"
  • "no-thousands-with-decimal"
  • "no-thousands-no-decimal"
  • "percent-with-decimal"
  • "percent-no-decimal"
  • "currency"

  • The value of cells for checkbox columns can be set using the checkbox 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 for rows.

  • 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 and collapseAll commands work on individual row trees as well as on the whole document

  • The name of documents 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 their visible property reflects this.

  • A new file attachment class has been added with a file name property, which must be a POSIX file. This copies the source file inside the OmniOutliner document as a new attachment. File attachments also handle the save command to get their contents back out.

  • The autosave interval property on document has been removed.

  • Sort orderings set on columns are non-destructive. Only the view is changed. This means that rows vended by AppleScript may not be in the same order as they appear on screen.

  • Added the pbcopy, pbpaste and pbsave commands to copy rows to and from the pasteboard.

  • The value property on the attribute class now returns a generic 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.

Last Modified: Oct 2, 2017

Can we help?

support@omnigroup.com
+1 206-523-4152 or 800-315-OMNI

Was this article helpful?

Still need help?

support@omnigroup.com
+1 206-523-4152 or 800-315-OMNI