What is applescript and what is it used for?
This link may help you to understand applescript better: http://www.macosxautomation.com/applescript/
AppleScript is a scripting language that can be used to automate actions on Macintosh computers.
Examples of actions that can be automated with AppleScript include filesystem operations, textual data parsing, running programs and invoking program functionality.
While I concur with the rest of the responders here—there are far too many other websites that have this information—I will tell you what I, personally, actually do with it to hopefully give a more practical understanding of what it can do as opposed to the academic or marketing definitions you'll get at other sites...
I manage a production department for a publishing company and I have dozens upon dozens of scripts that allow me to streamline and/or automate all sorts of processes including:
- fully automated page layout of marketing materials, contact sheets, and simple book designs using Excel, XML, and InDesign.
- large scale image conversions (typically hundreds of images) with Illustrator and Photoshop.
- automatic clean up of files (names, types, and some folder structures) to prep them for archiving.
Essentially, I use Applescript to automate any repetative task so that my folks can do better things with their time than repeating the same mindless mouse clicks over and over again. We just drop the files onto the slave Mac, start the script, and it beeps when it's done.
Applescript's "big advantage" over other scripting languages (which, frankly are much better to use for most tasks) is that it can automate the action of other applications on your Mac (as long as the developer has provided an Applescript dictionary).
This means that, as Philip Regan described, you can get an application like Photoshop to perform a whole bunch of repetitive photo modifications and then tuck those photos away in a folder, for example.
Other than that, one of the notable features of Applescript is its "English-like" syntax. Apple intended for it to be used by everyday people and tried to make its syntax as close to English as they could. This intention ran into a lot of problems, not the least of which was getting the people who were creating Applescript dictionaries for their applications to respect this goal. Apple also originally intended for there to be an Applescript for other human languages as well and there was work done on a "French Applescript" if I recall correctly.
There are now libraries in scripting languages like Python and Ruby for interfacing with Applescript so you can control the applications using Python or Ruby syntax and not using Applescript syntax (which can be extremely annoying to learn for someone coming from a programming background because of its irregularities and "foreignness").
Apple's latest move to bring application scripting to the everyday user is Automator. I suggest you try it out, as it can be quite useful if your aims are encompassed by things everyone does (keep copies of webpages, etc, etc,)