I've tried Automator and it's not the easiest thing to do if you're looking to move beyond your immediate request.
If you're willing to try a 3rd-party program, Keyboard Maestro is incredibly powerful and easy to use. I installed it and had my keyboard shortcuts running in no time.
One nice thing about KM is that you can create simple text-based shortcuts, so that you don't have to take your hands off the keyboard to use the macro. I'm a developer and use vim and the command-line extensively so not having to use any special keys is important to me.
So, in my case... I created a macro that was invoked with ',,,sign' which entered my testing user id, tabbed to the next field, entered the password, tabbed to the next field, entered the [Enter] key and - voila! - I am signed in.
Simple and incredibly effective. It's not free; after a trial period, you have to purchase it, but it was a no-brainer for me.