开发者

Programmatically controlling open source GUIs using C#

It seems that if you have a GUI that's open source such as TortoiseSVN (related question), anything you do repeat开发者_StackOverflow中文版edly with it should be automatable. The button clicks are linked to events, and the source code is there.

Is there an easy way to find the button handling events and automate your tasks?

I've heard of AutoIt, but what I'm looking for is something that would make use of a DLL file so no windows would be necessary.


It depends on the tool or program. Some of them are built on a layered architecture, and there's a library underneath that exposes all the required functions. I suppose some are not.

I'm not thinking of specifics, here. Just imagining that not every Windows application is nicely architectured inside, for re-use of the function. To answer your question, No, I don't think it's easy to just hook to the events in the general case. You'd have to do a good code inspection to see if that would work.

I know you said you were not considering automation, but you might want to rethink. There are Automation libraries in .NET now - System.Windows.Automation is the namespace, and it works with any Windows GUI application, not just applications built on .NET. It's not really difficult to do at all.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜