Mac OS X's Automator has the ability to perform specific tasks from its given set of actions. For example, with a Finder-based action, you can batch move copy, move or rename files that fit a certain criteria. Similarly, image-based actions allow you to batch edit images, be it resizing, rotating or changing their file type (i.e., from JPG to PNG or vice versa).
However, there may be situations that call for more unique tasks to be performed. And this is where Automator's "Watch Me Do" feature may come in handy. It performs keyboard- and mouse-based actions based on your movements and inputs during a Watch Me Do session.
To initiate a Watch Me Do session, launch Automator and choose a template (you can incorporate it into an existing Automator workflow, service or app as well). Then, click on the "Record" button in the upper right hand corner. A small grey translucent window with an Automator icon will now appear in the upper left hand corner indicating that your inputs and movements are being recorded; to stop recording, just click on the stop button.
I've found Watch Me Do actions particularly handy, especially when I'm too lazy to figure out how to do something in AppleScript.
Watch Me Do requires that you enable access for assistive devices, so you'll need to hop on over to the "Seeing" pane within the Universal Access section of Mac OS X's System Preferences.
Yes, Automator really can learn by watching you.