How to disable and enable things by script?

Example rule here