Along the same lines... I've written a program in VB that uses DDE to talk to MIRC. If anyone needs some sample (VB) code let me know.
The only problem with VB is the communication is one-way (at least it was at the time I wrote it, a few MIRC versions back)... from VB to MIRC.