Thanks for the help Descolada, especially the last example.
I don't mind, It is called MouseGestureL. Its a mouse mouse gesture program and its the best one out there on any platform, not just AHK (trust me, I have looked). The developer has been asked multiple times about plans for AHKV2, THIS person was the most recent person to ask.>If you don't mind me asking: what is the library that isn't ported over?
The version I use is somewhat modified from the public release to fit my needs and the fact that mouse gestures are a large part of how I use my PC, makes MouseGestureL deeply embedded in many parts of my AHK codebase.
There was another script library that I also make extensive use of and its developer abandoned it but luckily a kind fellow by the name of ntepa ported it over to AHKV2, HERE. So pretty much MouseGestureL is holding the only one me back.
I have been slowly figuring out how its codebase and design and I am confident as my know how increases I will be able to port it over, finger crossed lol.
I mean when you do AIL := UIA.ElementFromHandle(WinId), isn't the retrieved UIA data, in this case the illustrator window element and all of its sub elements, being dumped to the AIL variable?>What do you mean by "saving the entire application and all of its tree structure"? You can query for multiple elements at a time with FindAllBy, and/or you can cache properties via caching. I can't say whether you can prefetch the AIL object beforehand and interact with it even if it's closed, because it depends on how Illustrator handles its UIA implementations. Usually the UIA object would be invalid
I am thinking, if indeed the retrieved data is dumped to the variable, then what is contained in AIL is just raw data dump, that can be queried with general AHK code such as AIL[1].name or AIL[3].WindowID.
The main reason why I am trying to find about this is mostly to do with your note from Page 1:
Its safe to assume that AIL := UIA.ElementFromHandle(WinId) is a query from AHK to the external UIA interface.> Firstly, every UIA call to interact with elements is a cross-application call from AutoHotkey to the UIA framework, which takes a relatively long time. This means that it is recommended to set tight conditions for searches (like FindAll) and to do as little calls as possible. Doing something like FindAll with the True condition and looping over all the elements to find one specific one is strongly not recommended
Are further queries to the AIL object such as IDs:= AIL.FindAllByName("ControlType=Pane").GetParentHwnd() still further UIA queries and not just accessing the data that was saved to AIL through pure AHK facilities?