How to define own macros?

This is a better overview of scripting