Jump to content

Recommended Posts

Posted

Hi - new AutoIT user here so apologies for asking what may be 'trivial' questions.  

I've been working my way through the UIA Spy and UIA Automation examples, and can see that portions of the UIA_Constants.au3 file is based on Junkews CUIAutomation2.au3 file.  

After I failed to invoke a UIA tab control properly I found the following thread that mentions use of the _UIA_action function from Junkews UIAWrapper.au3 library as an alternative - which unfortunately is not compatible 'out of the box' with UIA_Constants.au3 due to the overlap / difference in constant names.

  • Many functionally equivalent constants have been renamed in the UIA_Constants.au3 file to include an underscore in the naming scheme (presumably to differentiate them from junkews original CUIAutomation2.au3 file?) - making it easy enough to map constants between the UIAWrapper and UIA_Constants files.
  • Even with the renaming there are still a few overlapping constant names that result in 'redeclaration' errors if both are left in place.

However, the $sIID_IUIAutomationCondition and $dtagIUIAutomationCondition constants used by the UIAWrapper library (and present in the CUIAutomation2 file) are completely absent from the UIA_Constants file - and are in fact the only constants that currently prevent UIAWrapper from working with UIA_Constants.au3.

So I added the missing constants into UIA_Constants.au3 and modified UIAWrapper.au3 file to use the updated UIA naming scheme - and now I have a version of the files that allows me to utilise the UIAWrapper functions whilst also taking advantage of LarsJ's function libraries and Win10-1809 / CreatePropertyConditionEx Substring match functions.  

Were these constants omitted from UIA_Constants.au3 for any particular reason at the time?

I can see from the history of the various threads that the various UIA function libraries were being developed in parallel with one another - but what isnt clear is how the two development branches relate to one another in their current state?  I appreciate that with all these things there is a maintenance overhead associated in trying to keep them up to date, but wondered why there dont appear to have been any attempts to re-merge the two separate branches into a single set of function libraries?

Apologies - I realise that with software development history, context is king - but trying to pick up the AutoIT tool without a proper understanding of how the various UIA libraries relate to one another is confusing to say the least - and had me going around in circles for a day or so 😀

Thanks for helping me to understand the current status of UIA Automation with AutoIT.

Regards,

Draksyl

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...