Rules / functions / scripts: best approach

Did you try this binding for OH2?