You can access the mIRC variables from another application using SendMessage and WM_MEVALUATE. Check out the mIRC help file on SendMessage..