It's because you are abusing the $isprocess identifier. What it does is use com objects to connect to the Windows Management Instrumentation (WMI), perform a query on it, and check for existance of the process.

It's crazy to perform that every 5 seconds, and is not surprising at all that it lags your mIRC.

Think of it as an identifier that you should use as sparingly as possible, so definitely not the way you do in your channel/status popups, needlessly checking for it 2 times, and definitely not in a timer to check every 5 seconds.

If I were you, i'd make a small alias to start those programs from mIRC instead with a switch %on. Since you disable them from mIRC, you can then set it to %off, and all this checking for the existance of the process is obsolete then.

If you sometimes start the programs before being in mIRC, then just do 1 check in the on start event to set the switches.

Greets