有没有办法在VB脚本中使用此Windows自动化API? [英] Is there a way to use this Windows Automation API in to VB Script?

查看:117
本文介绍了有没有办法在VB脚本中使用此Windows自动化API?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种方法,以便可以在VB Script的GUI自动化中使用这一出色的自动化功能.这需要某种ActiveX组件吗?

I am looking for a way if I can use this excellent piece of Automation functionality inside VB Script for GUI automation. Does this need somekind of ActiveX component? Please suggest me other alternatives as well.

推荐答案

矛盾,

恐怕无法从VB Script中使用它. Windows 7中引入的新UIA COM API可从C ++客户端和.NET客户端(通过COM互操作)使用,但是未实现VB脚本所需的较早的IDispatch技术.我们 重点关注流量最高的接口:本机C ++和.NET.

I'm afraid there isn't a way to use it from VB Script.  The new UIA COM API introduced in Windows 7 is usable from C++ clients and .NET clients (through COM interop), but the older IDispatch technology that VB script needs isn't implemented.  We focused on the highest traffic interfaces: native C++ and .NET.

我能想到的唯一解决方案是构建兼容IDispatch的COM DLL(也许使用ATL),该DLL将从您的VB脚本中进行调用,然后通过UIA进行调用.您不必复制整个UIA API,只需要复制尽可能多的内容即可. 使用.但这仍然是艰苦的工作.

The only solution I can picture would be to build an IDispatch-compatible COM DLL, perhaps using ATL, that would take calls from your VB script and then call through to UIA.  You wouldn't have to replicate the whole UIA API -- only as much as you were using.  But this is still hard work. 

谢谢,
迈克尔

Thanks,
Michael


这篇关于有没有办法在VB脚本中使用此Windows自动化API?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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