How to stop a script in endless loop?

check this: http://forum.mikrotik.com/t/command-to-interrupt-script-execution-in-if/21708/1