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 Interactive Help from the Help menu.
In particular, the Interactive Help window can help you: