Edit AllPages
OpenScripting is the Open Scripting Architecture and Carbon AppleScript API.
Wrapper: NDAppleScriptObject, in 10.2 and higher there is also an NSAppleScript class.