如何在应用程序中提取文本字段的坐标。 [英] How do I extract the coordinates of textfields in an application.

查看:63
本文介绍了如何在应用程序中提取文本字段的坐标。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序监视其他应用程序,例如通知用户他们的状态更改等。

有没有办法可以获取组件的坐标(如文本字段,标签)监控applciaiton上的wpf应用程序?

I have an applicaiton which monitors other applicaiton like notifying the users about their state changes etc.
Is there a way by which i can get the coordinates of the components (like textfields, labels) of a wpf application at the monitoring applciaiton?

推荐答案

不,一般情况下不是。也许只能通过图像识别。特别是,如果要监视的应用程序是WPF,它根本没有窗口控件,因此您不能使用原始Windows API来查找所有子项及其坐标。并且,在任何技术中,都可以构建轻量级控制,根本不使用任何通用API。



通常,与外部进程的通信不是专门为这种合作而设计的,这不是一项好任务。流程很好孤立;它们在不同的地址空间中执行。一些人在这个方向上工作的事实只是意味着人们滥用技术,而不是使用适当的软件,一个或另一个原因。例如,如果您从贵公司获得此类要求,则意味着您的公司或其部分是一个试图做坏事的更宽松(或潜在的失败者)。



-SA
No, not in general case. Maybe only through image recognition. In particular, if the application to be monitored is WPF, it does not have windowed control at all, so you cannot use, say, raw Windows API to find all children and their coordinate. And, in any technology, it is possible to build "light-weight" control which don't use any common API at all.

Generally, communication with external processes not specifically designed for such collaboration, is just not a good task. Processes are well isolated; they are executed in separate address spaces. The fact some works in this direction is done simply means that people are abusing technology, not using adequate software, by one or another reason. If, for example, you got such requirement from your company, it means that your company or its part is a looser (or a potential loser) trying to do bad business.

—SA


这篇关于如何在应用程序中提取文本字段的坐标。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆