How do I learn AppleScript?
Probably the best approach to learning AppleScript is to buy one of the available AppleScript books or the Scripting Kit and work through the scripts in the book. Constantly fooling around with AppleScript also helps. Because Apple event and object model support in third party applications isn't always consistent, you will quickly discover that what works in one program may not work in another. Experience is the best teacher in these cases.