Watch Me Do may work, but it's also likely to fail. The action records mouse and keyboard actions as they take place on screen. If the (aptly abbreviated) WMD action doesn't find the expected screen elements--everything just where it first was when the recording was made--it will usually bomb. In other words, WMD doesn't, for instance, find fields or buttons on a webpage, it simply navigates to a screen location and tries to type/click as it has been instructed in that spot. A few pixels off, boom!
As for AppleScript, here's one place to begin: http://www.macosxautomation.com/applescript/learn.html. Look at the Beginner's Tutorial "start here" link materials.
Explore the Mac OS X Technologies subforum, https://discussions.apple.com/community/mac_os/mac_os_x_technologies. It's where the AppleScript mavens can be found. If you search that forum for "learn AppleScript," you'll find great advice.