See the question and my original answer on StackOverflow

I would definitely try UI Automation. It may not work, but at least, it should be fairly easy to try. And, most of the time, if it does not work, it means there won't be any other "easy" way.

UI Automation finds its root in assistive technologies for disabled people, which is most of the time what we want to do with apps we don't own: do things from an external application, without being able to really do it "the standard way".

It also logically has the notion of events, see the officiel doc here: UI Automation Events Overview