I've already read that - it doesn't help

Without knowing how long I need the script loaded for, how do I tell mIRC to unload it?

As far as I can see, the only way is to either manually unload it before exiting - or to instruct mIRC to unload it upon exit.

But I'm still unsure how to go about that.