I am seeing intermittent behaviour on both XP and Windows 7. As far as I can tell, mIRC is not changing the focus when the main window is activated - it is left up to Windows to decide which window should be activated. I should be able to add a special check that resets the focus on the Script Editor if it was active when mIRC last lost focus. I'll see what I can do.