Use expressions with the event detector
An event is an expression with an associated action. Whenever the expression changes from False to True (that is, from zero to any non-zero value), the action (a command or macro) is run.
Provide Feedback