Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
AppleScript provides support for both in-application and cross-application scripting. Technically, it implements the former in terms of the latter, allowing applications to invoke scripts that, in turn, send them messages.
The key concept behind scripting on OS X is Apple Events. These are structured messages that encapsulate some high-level event. AppleScript is a domain-specific language designed for generating Apple Events and sending them to applications.