you are wrong about an infinite loop in mIRC not affecting other programs. CPU cycles are devided by demand, and if mIRC demands them all (due to the infinite loop) it will get nearly all of it which causes your whole system to freeze. this includes your command line which will then take much much longer to process then normal so the while loop goes on even longer.

use the /sleep script which is on this forum somewhere or use any other method to counter this problem. infinite loops are never a good solution really :-P