简体   繁体   English

从Windows中的其他应用程序GUI中提取数据

[英]Extract data from other app gui in Windows

I'd like to create application to combine measurements from two car systems and plot it. 我想创建一个应用程序,以结合两个汽车系统的测量结果并将其绘制出来。
One is external lambda sensor, second is aftermarket ECU for propane-butane conversion. 一种是外部λ传感器,第二种是用于丙烷-丁烷转换的售后ECU。
One could deliver AFR information, second RPM and engine load. 一个可以提供AFR信息,第二个RPM和发动机负载。

Unfortunately those app don't provide any api. 不幸的是,那些应用程序不提供任何API。 Apps have simple GUI, I thought that maybe extracting data from it could be solution. 应用程序具有简单的GUI,我认为也许从中提取数据可能是解决方案。 Is there any easy and reliable method to extract numbers/texts from other application? 是否有任何简单可靠的方法可以从其他应用程序中提取数字/文本? I'd like to use C++ or C# on Windows. 我想在Windows上使用C ++或C#。

One option is to retrieve the values directly from memory. 一种选择是直接从内存中检索值。 Get the window handle of the application, and traverse its child windows until you find the windows (fields) which contain the information you're looking for. 获取应用程序的窗口句柄,并遍历其子窗口,直到找到包含所需信息的窗口(字段)。 From what I read, the difficult part is finding the class names of the forms you're interested in. You can write this logic yourself using FindWindow and SendMessage , or use Managed Windows API . 根据我的阅读,困难的部分是找到您感兴趣的表单的类名。您可以使用FindWindowSendMessage自己编写此逻辑,也可以使用Managed Windows API编写此逻辑。

More information: 更多信息:

How to find a child of a parent unmanaged win32 app 如何找到父级非托管Win32应用程序的子级

How to read another windows from a different program 如何从其他程序读取其他窗口

How to find a child of a parent unmanaged win32 app 如何找到父级非托管Win32应用程序的子级

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM