What you are asking for currently is not possible in mIRC.
I suggest that you post a request in the Feature Suggestions forum requesting the ability to script to the Treebar