If you have any problems writing macros, you can get help from a number of places.
And last but not least, you can ask Keyboard Maestro itself for assistance by choosing Assistance from the Help menu.
In particular, the Assistance window can help you: