开发者

How to use C# client to get information of clicked GUI element in another app?

开发者 https://www.devze.com 2023-01-29 19:09 出处:网络
Can a C# client开发者_Python百科 record all keyboard and mouse events using hooks and collect information on the clicked GUI element?

Can a C# client开发者_Python百科 record all keyboard and mouse events using hooks and collect information on the clicked GUI element?

Which libary would you use?

Is Spy++ an option or would one need a C++ DLL for that?


It's better to do it in c++, you should register your hook, then you can create a bridge, but in C# may be Code project article is usefull.


Yes you can. See here and here. It's called event hooking.

You don't need any special library. Also, Spy++ is a standalone app that does this. Are you looking to write something like it with .NET?


Check out Deskperience and their Screen Scraper Studio product. Offers you a trial with the SDK.

Im trying to emulate their functionality at the moment, but finding it hard to do as Im a one man show...

Link to Deskperience Website


You have this lib, which is specially useful for managed apps. I'm not so sure how it interacts with non managed code though.


UISpy.exe is a tool using .net Automation Framework and will allow you to experiment with what you can automate in C#.

Along with lower level keyboard and mouse hooks as described by Paul Sasik in this question, you can translate the screen location into a .net automation object and gain additional info about what is being clicked or typed at.

0

精彩评论

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