你如何写一个一致的UI自动化的MS? MSAA和放大器; UI自动化似乎并不重叠 [英] How do you write a consistent UI Automation for MS? MSAA & UI Automation don't seem to overlap

查看:225
本文介绍了你如何写一个一致的UI自动化的MS? MSAA和放大器; UI自动化似乎并不重叠的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

拆装一般的自动化工具,考虑从Win32的消息钩子移动到.NET UI自动化,UI自动化的但是功能集并不包括所有我们在Win32中,仍然似乎并没有对支持所有的GUI Windows操作系统。

Working on a general Automation tool, considering moving from Win32 Message hooks to .net UI Automation, however the feature set of UI Automation doesn't cover all we have in Win32 and still doesn't seem to support all the GUI on Windows.

这样的一个例子是Windows Live Messenger的。

One such example is Windows Live Messenger.

Windows Live Messenger的2009年仍使用旧的DirectUIHwnd绘制的图形用户界面。这意味着你不能使用Windows消息发送到控件,因为控件没有自己的HWND。它似乎也打败新的.NET UI自动化框架,虽然文件似乎做出来,如果​​它可以在的 UI自动化和Microsoft Active Accessibility的文件。 看着 MS辅助指出,<一个href="http://www.microsoft.com/downloads/details.aspx?familyid=3755582a-a707-460a-bf21-1373316e13f0&displaylang=en#filelist"相对=nofollow>活动辅助功能2.0 SDK工具这表明MSAA可以与内容互动。

Windows Live messenger 2009 is still using the older DirectUIHwnd to draw the gui. This means that you can't use windows messages to send to the controls, because the controls don't have their own HWND. It also seems to defeat the new .net UI Automation framework though the documentation seems to make out as if it can be joined in the UI Automation and Microsoft Active Accessibility document. Looking at MS Accessibility pointed to Active Accessibility 2.0 SDK Tools which showed that MSAA can interact with the contents.

有一些窍门能让老MSAA技术,UI自动化似乎是试图取代实际使用UI自动化工作?

Is there some trick to getting the older MSAA technology that UI Automation seems to be trying to replace to actually work with UI Automation?

我宁愿不要有多个解决方案,试图自动化同一窗口的窗口与Windows Live Messenger的每个这些技术是有效的,并会工作。

I'd rather not have multiple solutions trying to automate the same windows for windows unlike Windows Live Messenger where each of these techniques is valid and will work.

推荐答案

您可能想看看<一href="http://blogs.msdn.com/winuiautomation/archive/2009/09/16/announcing-the-platform-update-for-windows-vista.aspx"相对=nofollow>的UIAutomation API ,第一次发布的Windows 7中的一部分,但现在可用于Windows XP和Vista的版本3。我相信,它已经与MSAA功能的目标交互的改进支持。

You might want to have a look at version 3 of the UIAutomation API, first released as part of Windows 7, but now available for XP and Vista. I believe it has improved support for interacting with MSAA-enabled targets.

这个新的API是基于COM的,而不是管理;但看看 UI自动化COM-到.NET适配器中的codePLEX。这利用了COM API并适应它具有相同的形状作为当前管理UIAutomation的API。

This new API is COM-based, rather than managed; but have a look at UI Automation COM-to .Net Adapter on CodePlex. This takes the COM Api and adapts it to have the same "shape" as the current managed UIAutomation API.

这篇关于你如何写一个一致的UI自动化的MS? MSAA和放大器; UI自动化似乎并不重叠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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