If your script gets in an infinite loop, or is just taking way too long, you can press ctrl+break to halt it. It even tells you what script/line mirc was on when it broke out.