Help on automating in games!

Hi, im new to all kind of this stuff…
I was wondering what I need to learn when I want to automate make macro’s) things in games… Any help is welcome and can sum1 leave an e-mail that I can contact (msn messenger).
For the macro is DirectX input required.