maul-esel / COM-Classes

AHK classes that implement COM interfaces
39 stars 10 forks source link

request interface: IUIAutomation #2

Open tinku99 opened 12 years ago

tinku99 commented 12 years ago

IUIAutomation: http://msdn.microsoft.com/en-us/library/windows/desktop/ee671406(v=VS.85).aspx bewildr using IUIAutomation in ironruby: http://www.natontesting.com/2010/07/20/announcing-bewildr-test-your-wpf-ui-apps-with-ironruby/ https://github.com/GraemeF/Fluid http://www.autoitscript.com/forum/topic/128406-interface-autoitobject-iuiautomation/

Edit: removed request for IAccessible as it already inherits from IDispatch

maul-esel commented 12 years ago

I also thought about IUIAutomation & friends some time ago. Although it surely will still be complicated when wrapped.

As for IAccessible, it inherits IDispatch, so I'm not sure why it should be wrapped?

Regards maul.esel

Edit: Personally, if I have any time, I'll probably look into IRichEdit OLE first. But of course you're welcome to contribute.

tinku99 commented 12 years ago

you're right as far as I know, IAccessible doesn't need a wrapper. I started working on the IUIAutomation wrapper, will post it if / when I am successful. IRichEditOle seems very useful also.
Thanks for this great library / framework / tutorial.

I wonder if its easier to just create a c++ project wrapping IUIAutomation with IDispatch... or with a csharp / .net interop project. Its already easy enough to use ironpython or ironruby, but I will give your framework a shot as it might be the right way to do it and easier for distribution.

maul-esel commented 12 years ago

Thanks for this great library / framework / tutorial.

You're welcome, and thanks for your help. If I can help you, let me know.

Out of interest, do you know an example where to get an IAccessible instance from? (To be sure I understand it correct: does each application, e.g. Firefox provide an own implementation? or is IAccessible implemented somewhere in Windows?)

Regards maul.esel

tinku99 commented 12 years ago

a lot of controls including .net controls provide IAccessible also... I just get it from AccessibleObjectFromPoint or MouseGetPos, OutputVarX, OutputVarY, OutputVarWin, OutputVarControl, 2 accobject := Acc_ObjectFromWindow(OutputVarControl) so an application may use prebuilt windows / wpf IAccessible objects without having itself implemented IAccessible...

IAccessible is deprecated and CUIAutomation generally gives you a lot more than IAccessible: http://msdn.microsoft.com/en-us/library/windows/desktop/ff384838(v=vs.85).aspx

Can get to anything using the desktop IUIAutomationElement : http://msdn.microsoft.com/en-us/library/windows/desktop/ee671544(v=vs.85).aspx

maul-esel commented 12 years ago

I looked a bit into it and it seems like a lot of work ;-) As I said, if you need any help or assistance, I'd be happy to help you. When wrapped, it will definitely be a great great thing.

maul-esel commented 12 years ago

see new UIAutomation branch