What is appscript?

Please note that appscript is no longer developed or supported , and its use is not recommended for new projects.

Appscript is a high-level, user-friendly Apple event bridge that allows you to control scriptable Mac OS X applications from Python, Ruby and Objective-C. Appscript makes these languages serious alternatives to Apple's own AppleScript language for automating your Mac.

For example, to get the value of the first paragraph of the topmost document in TextEdit using appscript:

app('TextEdit').documents['Read Me'].paragraphs[1].get()

This is equivalent to the AppleScript statement:

tell application "TextEdit" get paragraph 1 of document "Read Me" end tell

Benefits

Appscript provides:

a robust, polished API extensively field-tested since 2003

excellent compatibility with existing "AppleScriptable" applications, from venerable Carbon-based workhorses to the latest Cocoa-based releases

a powerful interactive help system for exploring scriptable applications' object models and dictionaries

a clean, object oriented-like syntax for ease of use

free developer tools ASDictionary exports application dictionaries in plain text and HTML formats ASTranslate converts AppleScript commands to their appscript equivalents

full support for Mac OS X 10.4 and later.

Implementations

To find out more about each version of appscript: