AutoHotkey is a free, open-source utility for Windows. With it, you can automate almost anything by sending keystrokes and mouse clicks. You can write a mouse or keyboard macro by hand or use the macro recorder and much more.
AutoHotkey - Free Mouse and Keyboard Macro Program with Hotkeys and AutoText
AutoHotkey - Free Mouse and Keyboard Macro Program with Hotkeys and AutoText