This article describes changes to AppleScript and related tools in OS X El Capitan v10.11.
Folder Actions now reliably notices all added and removed items in an observed folder.
Script Library Locations
AppleScript now has two additional search mechanisms when searching for script libraries:
Script libraries may now be located in any installed application bundle, in the
Contents/Library/Script Librariesdirectory of the bundle. This allows distributing libraries that are associated with an application, or creating applications that exist solely to distribute libraries.
The environment variable
OSA_LIBRARY_PATHmay be used to add more locations to search for script libraries. This allows using a library without installing it in one of the usual locations. The variable’s value is a colon-separated list of absolute POSIX paths, such as
OSA_LIBRARY_PATH='/opt/local/Script Libraries:/usr/local/Script Libraries'.
For complete details, see Creating a Library in the AppleScript Language Guide.
AppleScriptObjC now bridges several more types. As usual with AppleScriptObjC, conversion is automatic when passing an AppleScript object to an Objective-C method; converting an Objective-C object to an AppleScript value requires explicit coercion using
structtypes are bridged to records and vice versa. Lists are also bridged to
structsif the elements are in the correct order. Previously, only
structtypes with bitfield members are still not supported. 
File objects (
POSIX file) are now bridged to
NSURLobjects with a scheme of
fileare bridged to
dateobjects are now bridged to
NSDateand vice versa. NOTE: Converting between
NSDateis inherently imprecise:
datehas a resolution of exactly one second over its entire range, and is relative to the current time zone;
NSDatehas a variable resolution (for practical purposes, one to ten microseconds), and is a specific point in time. 
AppleScript now reliably recognizes constant and enumeration values from Objective-C frameworks. 
NSNumber objects to
real no longer truncates double-precision numbers to single-precision. (
someNSNumber's doubleValue has always worked correctly.) 
NSString objects to
string now functions the same as coercing to
Unicode text, preserving all characters. 
Other Bug Fixes
delay now functions correctly in applets, waiting for the full specified time. 
OSACopyScriptingDefinitionFromURL now works correctly if given a
file: URL. 
In an sdef,
access-group elements on a
suite are now correctly inherited by all the sub-elements, including
class-extension elements.