Komodo Macro API Concept (pseudo-code)