Apple Script
AppleScript is the Apple custom scripting language, it allows you to automate and interact with most Apple software applications. It's strange though because it uses pseudo english language syntax.
Documentation
- AppleScript for Absolute Starters (AS4AS)
A primer by Bert Altenburg for beginners just learning AppleScript.
- Python Bindings
Appscript is a high-level, user-friendly MacPython to Apple event bridge that allows you to control scriptable Mac OS X applications using ordinary Python scripts. Appscript makes MacPython a serious alternative to Apple's own AppleScript language for automating your Mac.