none
Is there a way to use this Windows Automation API in to VB Script?

    Question

  • 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.

    Tuesday, September 14, 2010 10:34 AM

All replies

  • Hi, ambivert,

    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.

    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


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Friday, September 17, 2010 4:25 PM
  • Thanks for the info Michael.

    Yeah, perhaps I need to move on to alterate solutions.

    Wednesday, October 13, 2010 4:07 PM