AppleScript is the scripting language that you can use to automate tasks on a Mac. These two books are the most popular books on the subject and you can use them to learn the language in depth. I have used AppleScript to dramatically increase my productivity at work and at home.
Applescript 1-2-3 by Sal Soghoian
Learn Applescript by Hamish Sanderson and Hanaan Rosenthal
My standard Craigslist disclaimer applies- first come first serve, there are no return, sold "as-is," use at your own risk.
do NOT contact me with unsolicited services or offers