If you're not already making use of the automation feature included in OS X, then you'll want to see the free guide on this site. It's available as a download, (print out its 73 pages!) or save as a pdf, or can be read online. Thanks to Jim Hamm for finding this information.