Simple On-the-fly keystroke macro recorder?
It's an expensive option (36$), but Keyboard Maestro can do this.


  Whether you are a power user or a grandparent (or both!), your time is
  precious. So why waste it when Keyboard Maestro can help improve
  almost every aspect of using your Mac. Even the simplest things, like
  typing your email address, or going to Gmail or Facebook, launching
  Pages, or duplicating a line, all take time and add frustration. Let
  Keyboard Maestro help make your Mac life more pleasant and efficient.