when mIRC closes successfully, when you click 'Ok' or Save the variables file in the Scripts Editor, when you perform /saveini... that's all i can recall off the top of my head. but you can be damned sure mIRC won't go through the trouble of writing data to disk in the middle of an executing script. that would be silly :D