Jump to content

WPF, still not in the todo


fdecourt
 Share

Recommended Posts

Hi every body,

Trying to automate some WPF application, I found some talking about that, and some saying that managin WPF is not in the todo lost. It was 3 or 4 year ago. Is it still the same, no WPF support for AutoIT, or one day will we see something available ?

Thanks and regards,

Link to comment
Share on other sites

  • Moderators

fdecourt,

You could put in a "feature request" here - although from what I have seen of the controls I doubt very much whether it would be considered. ;)

M23

P.S. Moved to "Dev Chat" as that section seems more appropriate.

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

It's definitely not a priority, and that's putting it nicely.

That is a shame.

It seems (IMO) that focus of AutoIt is moving away from "AUTOmation".

I am finding more programs that I can't automate because AutoIt can't control them and I'm forced to use "send" (When that is available) and hope for the best.

Ahh well just have to sit back and wait to see what the developers see as a priority. :)

Link to comment
Share on other sites

  • Moderators

storme,

Remember that AutoIt was designed as a Windows automation tool - it uses the Windows API to do most of its magic and if controls are not created with that API they are often outside its scope. Unless these other GUI toolkits are ready to accept external manipulation they are essentially unautomatable (if such a word exists) by 3rd party tools. Some developers add code within their software which opens up the possibility of creating UDFs to automate them (think Word and Excel) - but this takes added effort on their part and is not guaranteed to always work.

So not being able to automate these new GUIs has nothing to do with AutoIt's evolution - but everything to do with their own closed nature.

M23

P.S. Not the most precise technical language - if anyone wants to be more specific, be my guest! :D

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

storme,

Remember that AutoIt was designed as a Windows automation tool - it uses the Windows API

Yep know all that and it's been said many times before! It has become a mantra whenever this conversation comes up.

However, WPF is a frame work built for development of Windows applications and it's a pretty fine line to say AutoIt can/should ignore automation of WPF.

to do most of its magic and if controls are not created with that API they are often outside its scope.

Doesn't that mean that in the not to distant future AutoIt will be irrelevant because it's "scope" doesn't/Won't include any of these new Windows framework technologies?

I.E. When the API is superseded, the AUTO in AutoIt will cease to be.

Unless these other GUI toolkits are ready to accept external manipulation they are essentially unautomatable (if such a word exists) by 3rd party tools.

WPF (as I understand it) is automatable. :)

Isn't UI automation designed to automate WPF applications?

Some developers add code within their software which opens up the possibility of creating UDFs to automate them (think Word and Excel) - but this takes added effort on their part and is not guaranteed to always work.

Not quite the same issue.

I'm talking "frameworks" (e.g. WPF) not individual programs (e.g. Word & Excel)

So not being able to automate these new GUIs has nothing to do with AutoIt's evolution - but everything to do with their own closed nature.

If these applications use a standard framework (i.e. WPF) and the author hasn't gone to the effort of hiding interface elements.

Then as I understand it UI automation should be able to access the controls of that application.

OH and in case anyone thinks differently.

I AM NOT ATTACKING AUTOIT OR IT'S DEVELOPERS!!!!

So there is no need to defend it/them. :)

Link to comment
Share on other sites

as far as i read from wiki WPF use gdi and ditect3d to render so if that is correct and i understood it correctly i whud like more info about

WPF (as I understand it) is automatable.

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

The reason I siad "As I understand it" is I only started searching on this a couple of days ago.

However, UI Automation appears to be able to automate WPF applications and others.

http://msdn.microsoft.com/en-us/library/ms747327.aspx

UI Automation provides programmatic access to most user interface (UI) elements on the desktop, enabling assistive technology products such as screen readers to provide information about the UI to end users and to manipulate the UI by means other than standard input.

UI Automation client applications can be written with the assurance that they will work on multiple frameworks.

http://www.codeproject.com/Articles/33049/WPF-UI-Automation

Nice little basic demo I haven't had a chance to try yet. :(

Link to comment
Share on other sites

So what would ControlGethandle return for a wpf control?

Hi Mat

From my resaerch ControlGethandle would return 0 as WPF doesn't use handles.

From the source

http://msdn.microsoft.com/en-us/library/ms747327.aspx

UI Automation Model

UI Automation exposes every piece of the UI to client applications as an AutomationElement. Elements are contained in a tree structure, with the desktop as the root element. Clients can filter the raw view of the tree as a control view or a content view. (These standard views of the structure can easily be seen by using the UI Spy application included with this software development kit (SDK)). Applications can also create custom views.

AutomationElement objects expose common properties of the UI elements they represent. One of these properties is the control type, which defines its basic appearance and functionality as a single recognizable entity: for example, a button or check box.

In addition, elements expose control patterns that provide properties specific to their control types. Control patterns also expose methods that enable clients to get further information about the element and to provide input.

Posted Image Note

There is not a one-to-one correspondence between control types and control patterns. A control pattern may be supported by multiple control types, and a control may support multiple control patterns, each of which exposes different aspects of its behavior. For example, a combo box has at least two control patterns: one that represents its ability to expand and collapse, and another that represents the selection mechanism. For specifics, see UI Automation Control Types.

UI Automation also provides information to client applications through events. Unlike WinEvents, UI Automation events are not based on a broadcast mechanism. UI Automation clients register for specific event notifications and can request that specific UI Automation properties and control pattern information be passed into their event handlers. In addition, a UI Automation event contains a reference to the element that raised it. Providers can improve performance by raising events selectively, depending on whether any clients are listening.

0 because WPF don't use handles...

Link to comment
Share on other sites

WPF controls should be controllable with ui automation.

Indeed

should give direction on how to do ui automation on WPF controls from within AutoIT

I don't have a WPF application available to try but if someone posts a link to an open source WPF application I can try to make working example

Link to comment
Share on other sites

In addition to previous answer

Try to get hold of inspect.exe part of the windows sdk

"C:Program FilesMicrosoft SDKsWindowsv7.1Binx64Inspect.exe"

http://msdn.microsoft.com/en-us/library/windows/desktop/dd318521(v=vs.85).aspx

If that shows you information on the WPF controls I am sure with the other threads on uiAutomation can help you further to get it thru autoit

Below some sample code which will be based on the latest beta with objcreateinterface function and uiautomation

1. run the program

2. hover to the control you are interested in

3. press ctrl+m and it will show you all information retrievable with UI automation

If you have an object you should be able to get the property with the right information you are looking for

#include <WinAPI.au3>

HotKeySet("{ESC}", "Close") ; Set ESC as a hotkey to exit the script.

HotKeySet("^m", "GetElementInfo") ; Set Hotkey Ctrl+M

;~ http://www.autoitscript.com/forum/topic/128406-interface-autoitobject-iuiautomation/
;~ http://msdn.microsoft.com/en-us/library/windows/desktop/ff625914(v=vs.85).aspx

Global $oDesktop, $pDesktop         ;Desktop will be frequently the starting point
Global $oUIElement, $pUIElement ;Used frequently to get an element

Global Const $sCLSID_CUIAutomation="{FF48DBA4-60EF-4201-AA87-54103EEF594E}"
Global Const $sIID_IUIAutomation="{30CBE57D-D9D0-452A-AB13-7AC5AC4825EE}"
Global $dtagIUIAutomation = "CompareElements hresult(ptr;ptr;long*);" & _ ;CompareElements hresult([in] IUIAutomationElement *;[in] IUIAutomationElement *;[out] int )
"CompareRuntimeIds hresult(ptr;ptr;long*);" & _ ;CompareRuntimeIds hresult([in] ne ;[in] ne ;[out] int )
"GetRootElement hresult(ptr*);" & _ ;GetRootElement hresult([out] IUIAutomationElement **)
"ElementFromHandle hresult(none;ptr*);" & _ ;ElementFromHandle hresult([in] void ;[out] IUIAutomationElement **)
"ElementFromPoint hresult(struct;ptr*);" & _ ;ElementFromPoint hresult([in] tagPOINT ;[out] IUIAutomationElement **)
"GetFocusedElement hresult(ptr*);" & _ ;GetFocusedElement hresult([out] IUIAutomationElement **)
"GetRootElementBuildCache hresult(ptr;ptr*);" & _ ;GetRootElementBuildCache hresult([in] IUIAutomationCacheRequest *;[out] IUIAutomationElement **)
"ElementFromHandleBuildCache hresult(none;ptr;ptr*);" & _ ;ElementFromHandleBuildCache hresult([in] void ;[in] IUIAutomationCacheRequest *;[out] IUIAutomationElement **)
"ElementFromPointBuildCache hresult(none;ptr;ptr*);" & _ ;ElementFromPointBuildCache hresult([in] tagPOINT ;[in] IUIAutomationCacheRequest *;[out] IUIAutomationElement **)
"GetFocusedElementBuildCache hresult(ptr;ptr*);" & _ ;GetFocusedElementBuildCache hresult([in] IUIAutomationCacheRequest *;[out] IUIAutomationElement **)
"CreateTreeWalker hresult(ptr;ptr*);" & _ ;CreateTreeWalker hresult([in] IUIAutomationCondition *;[out] IUIAutomationTreeWalker **)
"ControlViewWalker hresult(ptr*);" & _ ;ControlViewWalker hresult([out] IUIAutomationTreeWalker **)
"ContentViewWalker hresult(ptr*);" & _ ;ContentViewWalker hresult([out] IUIAutomationTreeWalker **)
"RawViewWalker hresult(ptr*);" & _ ;RawViewWalker hresult([out] IUIAutomationTreeWalker **)
"RawViewCondition hresult(ptr*);" & _ ;RawViewCondition hresult([out] IUIAutomationCondition **)
"ControlViewCondition hresult(ptr*);" & _ ;ControlViewCondition hresult([out] IUIAutomationCondition **)
"ContentViewCondition hresult(ptr*);" & _ ;ContentViewCondition hresult([out] IUIAutomationCondition **)
"CreateCacheRequest hresult(ptr*);" & _ ;CreateCacheRequest hresult([out] IUIAutomationCacheRequest **)
"CreateTrueCondition hresult(ptr*);" & _ ;CreateTrueCondition hresult([out] IUIAutomationCondition **)
"CreateFalseCondition hresult(ptr*);" & _ ;CreateFalseCondition hresult([out] IUIAutomationCondition **)
"CreatePropertyCondition hresult(int;variant;ptr*);" & _ ;CreatePropertyCondition hresult([in] int ;[in] variant ;[out] IUIAutomationCondition **)
"CreatePropertyConditionEx hresult(int;variant;long;ptr*);" & _ ;CreatePropertyConditionEx hresult([in] int ;[in] variant ;[in] PropertyConditionFlags ;[out] IUIAutomationCondition **)
"CreateAndCondition hresult(ptr;ptr;ptr*);" & _ ;CreateAndCondition hresult([in] IUIAutomationCondition *;[in] IUIAutomationCondition *;[out] IUIAutomationCondition **)
"CreateAndConditionFromArray hresult(ptr;ptr*);" & _ ;CreateAndConditionFromArray hresult([in] IUIAutomationCondition ;[out] IUIAutomationCondition **)
"CreateAndConditionFromNativeArray hresult(ptr;int;ptr*);" & _ ;CreateAndConditionFromNativeArray hresult([in] IUIAutomationCondition **;[in] int ;[out] IUIAutomationCondition **)
"CreateOrCondition hresult(ptr;ptr;ptr*);" & _ ;CreateOrCondition hresult([in] IUIAutomationCondition *;[in] IUIAutomationCondition *;[out] IUIAutomationCondition **)
"CreateOrConditionFromArray hresult(ptr;ptr*);" & _ ;CreateOrConditionFromArray hresult([in] IUIAutomationCondition ;[out] IUIAutomationCondition **)
"CreateOrConditionFromNativeArray hresult(ptr;int;ptr*);" & _ ;CreateOrConditionFromNativeArray hresult([in] IUIAutomationCondition **;[in] int ;[out] IUIAutomationCondition **)
"CreateNotCondition hresult(ptr;ptr*);" & _ ;CreateNotCondition hresult([in] IUIAutomationCondition *;[out] IUIAutomationCondition **)
"AddAutomationEventHandler hresult(int;ptr;long;ptr;ptr);" & _ ;AddAutomationEventHandler hresult([in] int ;[in] IUIAutomationElement *;[in] TreeScope ;[in] IUIAutomationCacheRequest *;[in] IUIAutomationEventHandler *)
"RemoveAutomationEventHandler hresult(int;ptr;ptr);" & _ ;RemoveAutomationEventHandler hresult([in] int ;[in] IUIAutomationElement *;[in] IUIAutomationEventHandler *)
"AddPropertyChangedEventHandlerNativeArray hresult(ptr;long;ptr;ptr;int;int);" & _ ;AddPropertyChangedEventHandlerNativeArray hresult([in] IUIAutomationElement *;[in] TreeScope ;[in] IUIAutomationCacheRequest *;[in] IUIAutomati&#111;npropertychangedEventHandler *;[in] int ;[in] int )
"AddPropertyChangedEventHandler hresult(ptr;long;ptr;ptr;ptr);" & _ ;AddPropertyChangedEventHandler hresult([in] IUIAutomationElement *;[in] TreeScope ;[in] IUIAutomationCacheRequest *;[in] IUIAutomati&#111;npropertychangedEventHandler *;[in] ne )
"RemovePropertyChangedEventHandler hresult(ptr;ptr);" & _ ;RemovePropertyChangedEventHandler hresult([in] IUIAutomationElement *;[in] IUIAutomati&#111;npropertychangedEventHandler *)
"AddStructureChangedEventHandler hresult(ptr;long;ptr;ptr);" & _ ;AddStructureChangedEventHandler hresult([in] IUIAutomationElement *;[in] TreeScope ;[in] IUIAutomationCacheRequest *;[in] IUIAutomationStructureChangedEventHandler *)
"RemoveStructureChangedEventHandler hresult(ptr;ptr);" & _ ;RemoveStructureChangedEventHandler hresult([in] IUIAutomationElement *;[in] IUIAutomationStructureChangedEventHandler *)
"AddFocusChangedEventHandler hresult(ptr;ptr);" & _ ;AddFocusChangedEventHandler hresult([in] IUIAutomationCacheRequest *;[in] IUIAutomati&#111;nfocusChangedEventHandler *)
"RemoveFocusChangedEventHandler hresult(ptr);" & _ ;RemoveFocusChangedEventHandler hresult([in] IUIAutomati&#111;nfocusChangedEventHandler *)
"RemoveAllEventHandlers hresult();" & _ ;RemoveAllEventHandlers hresult()
"IntNativeArrayToSafeArray hresult(int;int;ptr*);" & _ ;IntNativeArrayToSafeArray hresult([in] int ;[in] int ;[out] ne )
"IntSafeArrayToNativeArray hresult(ptr;int*;int*);" & _ ;IntSafeArrayToNativeArray hresult([in] ne ;[out] int ;[out] int )
"RectToVariant hresult(none;variant*);" & _ ;RectToVariant hresult([in] tagRECT ;[out] variant )
"VariantToRect hresult(variant;none*);" & _ ;VariantToRect hresult([in] variant ;[out] tagRECT *)
"SafeArrayToRectNativeArray hresult(ptr;none*;int*);" & _ ;SafeArrayToRectNativeArray hresult([in] ne ;[out] tagRECT **;[out] int )
"CreateProxyFactoryEntry hresult(ptr;ptr*);" & _ ;CreateProxyFactoryEntry hresult([in] IUIAutomationProxyFactory *;[out] IUIAutomationProxyFactoryEntry **)
"ProxyFactoryMapping hresult(ptr*);" & _ ;ProxyFactoryMapping hresult([out] IUIAutomationProxyFactoryMapping **)
"GetPropertyProgrammaticName hresult(int;bstr*);" & _ ;GetPropertyProgrammaticName hresult([in] int ;[out] bstr )
"GetPatternProgrammaticName hresult(int;bstr*);" & _ ;GetPatternProgrammaticName hresult([in] int ;[out] bstr )
"PollForPotentialSupportedPatterns hresult(ptr;ptr*;ptr*);" & _ ;PollForPotentialSupportedPatterns hresult([in] IUIAutomationElement *;[out] ne ;[out] ne )
"PollForPotentialSupportedProperties hresult(ptr;ptr*;ptr*);" & _ ;PollForPotentialSupportedProperties hresult([in] IUIAutomationElement *;[out] ne ;[out] ne )
"CheckNotSupported hresult(variant;long*);" & _ ;CheckNotSupported hresult([in] variant ;[out] int )
"ReservedNotSupportedValue hresult(ptr*);" & _ ;ReservedNotSupportedValue hresult([out] iunknown )
"ReservedMixedAttributeValue hresult(ptr*);" & _ ;ReservedMixedAttributeValue hresult([out] iunknown )
"ElementFromIAccessible hresult(none;int;ptr*);" & _ ;ElementFromIAccessible hresult([in] IAccessible *;[in] int ;[out] IUIAutomationElement **)
"ElementFromIAccessibleBuildCache hresult(none;int;ptr;ptr*);" ;ElementFromIAccessibleBuildCache hresult([in] IAccessible *;[in] int ;[in] IUIAutomationCacheRequest *;[out] IUIAutomationElement **)
;===============================================================================

Global Const $sIID_IUIAutomationElement="{D22108AA-8AC5-49A5-837B-37BBB3D7591E}"
Global $dtagIUIAutomationElement = "SetFocus hresult();" & _ ;SetFocus hresult()
"GetRuntimeId hresult(ptr*);" & _ ;GetRuntimeId hresult([out] ne )
"FindFirst hresult(long;ptr;ptr*);" & _ ;FindFirst hresult([in] TreeScope ;[in] IUIAutomationCondition *;[out] IUIAutomationElement **)
"FindAll hresult(long;ptr;ptr*);" & _ ;FindAll hresult([in] TreeScope ;[in] IUIAutomationCondition *;[out] IUIAutomationElementArray **)
"FindFirstBuildCache hresult(long;ptr;ptr;ptr*);" & _ ;FindFirstBuildCache hresult([in] TreeScope ;[in] IUIAutomationCondition *;[in] IUIAutomationCacheRequest *;[out] IUIAutomationElement **)
"FindAllBuildCache hresult(long;ptr;ptr;ptr*);" & _ ;FindAllBuildCache hresult([in] TreeScope ;[in] IUIAutomationCondition *;[in] IUIAutomationCacheRequest *;[out] IUIAutomationElementArray **)
"BuildUpdatedCache hresult(ptr;ptr*);" & _ ;BuildUpdatedCache hresult([in] IUIAutomationCacheRequest *;[out] IUIAutomationElement **)
"GetCurrentPropertyValue hresult(int;variant*);" & _ ;GetCurrentPropertyValue hresult([in] int ;[out] variant )
"GetCurrentPropertyValueEx hresult(int;long;variant*);" & _ ;GetCurrentPropertyValueEx hresult([in] int ;[in] int ;[out] variant )
"GetCachedPropertyValue hresult(int;variant*);" & _ ;GetCachedPropertyValue hresult([in] int ;[out] variant )
"GetCachedPropertyValueEx hresult(int;long;variant*);" & _ ;GetCachedPropertyValueEx hresult([in] int ;[in] int ;[out] variant )
"GetCurrentPatternAs hresult(int;none;none*);" & _ ;GetCurrentPatternAs hresult([in] int ;[in] GUID *;[out] void )
"GetCachedPatternAs hresult(int;none;none*);" & _ ;GetCachedPatternAs hresult([in] int ;[in] GUID *;[out] void )
"GetCurrentPattern hresult(int;ptr*);" & _ ;GetCurrentPattern hresult([in] int ;[out] iunknown )
"GetCachedPattern hresult(int;ptr*);" & _ ;GetCachedPattern hresult([in] int ;[out] iunknown )
"GetCachedParent hresult(ptr*);" & _ ;GetCachedParent hresult([out] IUIAutomationElement **)
"GetCachedChildren hresult(ptr*);" & _ ;GetCachedChildren hresult([out] IUIAutomationElementArray **)
"CurrentProcessId hresult(int*);" & _ ;CurrentProcessId hresult([out] int )
"CurrentControlType hresult(int*);" & _ ;CurrentControlType hresult([out] int )
"CurrentLocalizedControlType hresult(bstr*);" & _ ;CurrentLocalizedControlType hresult([out] bstr )
"CurrentName hresult(bstr*);" & _ ;CurrentName hresult([out] bstr )
"CurrentAcceleratorKey hresult(bstr*);" & _ ;CurrentAcceleratorKey hresult([out] bstr )
"CurrentAccessKey hresult(bstr*);" & _ ;CurrentAccessKey hresult([out] bstr )
"CurrentHasKeyboardFocus hresult(long*);" & _ ;CurrentHasKeyboardFocus hresult([out] int )
"CurrentIsKeyboardFocusable hresult(long*);" & _ ;CurrentIsKeyboardFocusable hresult([out] int )
"CurrentIsEnabled hresult(long*);" & _ ;CurrentIsEnabled hresult([out] int )
"CurrentAutomationId hresult(bstr*);" & _ ;CurrentAutomationId hresult([out] bstr )
"CurrentClassName hresult(bstr*);" & _ ;CurrentClassName hresult([out] bstr )
"CurrentHelpText hresult(bstr*);" & _ ;CurrentHelpText hresult([out] bstr )
"CurrentCulture hresult(int*);" & _ ;CurrentCulture hresult([out] int )
"CurrentIsControlElement hresult(long*);" & _ ;CurrentIsControlElement hresult([out] int )
"CurrentIsContentElement hresult(long*);" & _ ;CurrentIsContentElement hresult([out] int )
"CurrentIsPassword hresult(long*);" & _ ;CurrentIsPassword hresult([out] int )
"CurrentNativeWindowHandle hresult(none*);" & _ ;CurrentNativeWindowHandle hresult([out] void )
"CurrentItemType hresult(bstr*);" & _ ;CurrentItemType hresult([out] bstr )
"CurrentIsOffscreen hresult(long*);" & _ ;CurrentIsOffscreen hresult([out] int )
"CurrentOrientation hresult(long*);" & _ ;CurrentOrientation hresult([out] OrientationType *)
"CurrentFrameworkId hresult(bstr*);" & _ ;CurrentFrameworkId hresult([out] bstr )
"CurrentIsRequiredForForm hresult(long*);" & _ ;CurrentIsRequiredForForm hresult([out] int )
"CurrentItemStatus hresult(bstr*);" & _ ;CurrentItemStatus hresult([out] bstr )
"CurrentBoundingRectangle hresult(none*);" & _ ;CurrentBoundingRectangle hresult([out] tagRECT *)
"CurrentLabeledBy hresult(ptr*);" & _ ;CurrentLabeledBy hresult([out] IUIAutomationElement **)
"CurrentAriaRole hresult(bstr*);" & _ ;CurrentAriaRole hresult([out] bstr )
"CurrentAriaProperties hresult(bstr*);" & _ ;CurrentAriaProperties hresult([out] bstr )
"CurrentIsDataValidForForm hresult(long*);" & _ ;CurrentIsDataValidForForm hresult([out] int )
"CurrentControllerFor hresult(ptr*);" & _ ;CurrentControllerFor hresult([out] IUIAutomationElementArray **)
"CurrentDescribedBy hresult(ptr*);" & _ ;CurrentDescribedBy hresult([out] IUIAutomationElementArray **)
"CurrentFlowsTo hresult(ptr*);" & _ ;CurrentFlowsTo hresult([out] IUIAutomationElementArray **)
"CurrentProviderDescription hresult(bstr*);" & _ ;CurrentProviderDescription hresult([out] bstr )
"CachedProcessId hresult(int*);" & _ ;CachedProcessId hresult([out] int )
"CachedControlType hresult(int*);" & _ ;CachedControlType hresult([out] int )
"CachedLocalizedControlType hresult(bstr*);" & _ ;CachedLocalizedControlType hresult([out] bstr )
"CachedName hresult(bstr*);" & _ ;CachedName hresult([out] bstr )
"CachedAcceleratorKey hresult(bstr*);" & _ ;CachedAcceleratorKey hresult([out] bstr )
"CachedAccessKey hresult(bstr*);" & _ ;CachedAccessKey hresult([out] bstr )
"CachedHasKeyboardFocus hresult(long*);" & _ ;CachedHasKeyboardFocus hresult([out] int )
"CachedIsKeyboardFocusable hresult(long*);" & _ ;CachedIsKeyboardFocusable hresult([out] int )
"CachedIsEnabled hresult(long*);" & _ ;CachedIsEnabled hresult([out] int )
"CachedAutomationId hresult(bstr*);" & _ ;CachedAutomationId hresult([out] bstr )
"CachedClassName hresult(bstr*);" & _ ;CachedClassName hresult([out] bstr )
"CachedHelpText hresult(bstr*);" & _ ;CachedHelpText hresult([out] bstr )
"CachedCulture hresult(int*);" & _ ;CachedCulture hresult([out] int )
"CachedIsControlElement hresult(long*);" & _ ;CachedIsControlElement hresult([out] int )
"CachedIsContentElement hresult(long*);" & _ ;CachedIsContentElement hresult([out] int )
"CachedIsPassword hresult(long*);" & _ ;CachedIsPassword hresult([out] int )
"CachedNativeWindowHandle hresult(none*);" & _ ;CachedNativeWindowHandle hresult([out] void )
"CachedItemType hresult(bstr*);" & _ ;CachedItemType hresult([out] bstr )
"CachedIsOffscreen hresult(long*);" & _ ;CachedIsOffscreen hresult([out] int )
"CachedOrientation hresult(long*);" & _ ;CachedOrientation hresult([out] OrientationType *)
"CachedFrameworkId hresult(bstr*);" & _ ;CachedFrameworkId hresult([out] bstr )
"CachedIsRequiredForForm hresult(long*);" & _ ;CachedIsRequiredForForm hresult([out] int )
"CachedItemStatus hresult(bstr*);" & _ ;CachedItemStatus hresult([out] bstr )
"CachedBoundingRectangle hresult(none*);" & _ ;CachedBoundingRectangle hresult([out] tagRECT *)
"CachedLabeledBy hresult(ptr*);" & _ ;CachedLabeledBy hresult([out] IUIAutomationElement **)
"CachedAriaRole hresult(bstr*);" & _ ;CachedAriaRole hresult([out] bstr )
"CachedAriaProperties hresult(bstr*);" & _ ;CachedAriaProperties hresult([out] bstr )
"CachedIsDataValidForForm hresult(long*);" & _ ;CachedIsDataValidForForm hresult([out] int )
"CachedControllerFor hresult(ptr*);" & _ ;CachedControllerFor hresult([out] IUIAutomationElementArray **)
"CachedDescribedBy hresult(ptr*);" & _ ;CachedDescribedBy hresult([out] IUIAutomationElementArray **)
"CachedFlowsTo hresult(ptr*);" & _ ;CachedFlowsTo hresult([out] IUIAutomationElementArray **)
"CachedProviderDescription hresult(bstr*);" & _ ;CachedProviderDescription hresult([out] bstr )
"GetClickablePoint hresult(none*;long*);" ;GetClickablePoint hresult([out] tagPOINT *;[out] int )
;===============================================================================
;module UIA_PropertyIds
;===============================================================================
Global Const $UIA_RuntimeIdPropertyId=30000
Global Const $UIA_BoundingRectanglePropertyId=30001
Global Const $UIA_ProcessIdPropertyId=30002
Global Const $UIA_ControlTypePropertyId=30003
Global Const $UIA_LocalizedControlTypePropertyId=30004
Global Const $UIA_NamePropertyId=30005
Global Const $UIA_AcceleratorKeyPropertyId=30006
Global Const $UIA_AccessKeyPropertyId=30007
Global Const $UIA_HasKeyboardFocusPropertyId=30008
Global Const $UIA_IsKeyboardFocusablePropertyId=30009
Global Const $UIA_IsEnabledPropertyId=30010
Global Const $UIA_AutomationIdPropertyId=30011
Global Const $UIA_ClassNamePropertyId=30012
Global Const $UIA_HelpTextPropertyId=30013
Global Const $UIA_ClickablePointPropertyId=30014
Global Const $UIA_CulturePropertyId=30015
Global Const $UIA_IsControlElementPropertyId=30016
Global Const $UIA_IsContentElementPropertyId=30017
Global Const $UIA_LabeledByPropertyId=30018
Global Const $UIA_IsPasswordPropertyId=30019
Global Const $UIA_NativeWindowHandlePropertyId=30020
Global Const $UIA_ItemTypePropertyId=30021
Global Const $UIA_IsOffscreenPropertyId=30022
Global Const $UIA_OrientationPropertyId=30023
Global Const $UIA_FrameworkIdPropertyId=30024
Global Const $UIA_IsRequiredForFormPropertyId=30025
Global Const $UIA_ItemStatusPropertyId=30026
Global Const $UIA_IsDockPatternAvailablePropertyId=30027
Global Const $UIA_IsExpandCollapsePatternAvailablePropertyId=30028
Global Const $UIA_IsGridItemPatternAvailablePropertyId=30029
Global Const $UIA_IsGridPatternAvailablePropertyId=30030
Global Const $UIA_IsInvokePatternAvailablePropertyId=30031
Global Const $UIA_IsMultipleViewPatternAvailablePropertyId=30032
Global Const $UIA_IsRangeValuePatternAvailablePropertyId=30033
Global Const $UIA_IsScrollPatternAvailablePropertyId=30034
Global Const $UIA_IsScrollItemPatternAvailablePropertyId=30035
Global Const $UIA_IsSelectionItemPatternAvailablePropertyId=30036
Global Const $UIA_IsSelectionPatternAvailablePropertyId=30037
Global Const $UIA_IsTablePatternAvailablePropertyId=30038
Global Const $UIA_IsTableItemPatternAvailablePropertyId=30039
Global Const $UIA_IsTextPatternAvailablePropertyId=30040
Global Const $UIA_IsTogglePatternAvailablePropertyId=30041
Global Const $UIA_IsTransformPatternAvailablePropertyId=30042
Global Const $UIA_IsValuePatternAvailablePropertyId=30043
Global Const $UIA_IsWindowPatternAvailablePropertyId=30044
Global Const $UIA_ValueValuePropertyId=30045
Global Const $UIA_ValueIsReadOnlyPropertyId=30046
Global Const $UIA_RangeValueValuePropertyId=30047
Global Const $UIA_RangeValueIsReadOnlyPropertyId=30048
Global Const $UIA_RangeValueMinimumPropertyId=30049
Global Const $UIA_RangeValueMaximumPropertyId=30050
Global Const $UIA_RangeValueLargeChangePropertyId=30051
Global Const $UIA_RangeValueSmallChangePropertyId=30052
Global Const $UIA_ScrollHorizontalScrollPercentPropertyId=30053
Global Const $UIA_ScrollHorizontalViewSizePropertyId=30054
Global Const $UIA_ScrollVerticalScrollPercentPropertyId=30055
Global Const $UIA_ScrollVerticalViewSizePropertyId=30056
Global Const $UIA_ScrollHorizontallyScrollablePropertyId=30057
Global Const $UIA_ScrollVerticallyScrollablePropertyId=30058
Global Const $UIA_Selecti&#111;nselectionPropertyId=30059
Global Const $UIA_SelectionCanSelectMultiplePropertyId=30060
Global Const $UIA_SelectionIsSelectionRequiredPropertyId=30061
Global Const $UIA_GridRowCountPropertyId=30062
Global Const $UIA_GridColumnCountPropertyId=30063
Global Const $UIA_GridItemRowPropertyId=30064
Global Const $UIA_GridItemColumnPropertyId=30065
Global Const $UIA_GridItemRowSpanPropertyId=30066
Global Const $UIA_GridItemColumnSpanPropertyId=30067
Global Const $UIA_GridItemContainingGridPropertyId=30068
Global Const $UIA_DockDockPositionPropertyId=30069
Global Const $UIA_ExpandCollapseExpandCollapseStatePropertyId=30070
Global Const $UIA_MultipleViewCurrentViewPropertyId=30071
Global Const $UIA_MultipleViewSupportedViewsPropertyId=30072
Global Const $UIA_WindowCanMaximizePropertyId=30073
Global Const $UIA_WindowCanMinimizePropertyId=30074
Global Const $UIA_WindowWindowVisualStatePropertyId=30075
Global Const $UIA_WindowWindowInteractionStatePropertyId=30076
Global Const $UIA_WindowIsModalPropertyId=30077
Global Const $UIA_WindowIsTopmostPropertyId=30078
Global Const $UIA_SelectionItemIsSelectedPropertyId=30079
Global Const $UIA_SelectionItemSelectionContainerPropertyId=30080
Global Const $UIA_TableRowHeadersPropertyId=30081
Global Const $UIA_TableColumnHeadersPropertyId=30082
Global Const $UIA_TableRowOrColumnMajorPropertyId=30083
Global Const $UIA_TableItemRowHeaderItemsPropertyId=30084
Global Const $UIA_TableItemColumnHeaderItemsPropertyId=30085
Global Const $UIA_ToggleToggleStatePropertyId=30086
Global Const $UIA_TransformCanMovePropertyId=30087
Global Const $UIA_TransformCanResizePropertyId=30088
Global Const $UIA_TransformCanRotatePropertyId=30089
Global Const $UIA_IsLegacyIAccessiblePatternAvailablePropertyId=30090
Global Const $UIA_LegacyIAccessibleChildIdPropertyId=30091
Global Const $UIA_LegacyIAccessibleNamePropertyId=30092
Global Const $UIA_LegacyIAccessibleValuePropertyId=30093
Global Const $UIA_LegacyIAccessibleDescriptionPropertyId=30094
Global Const $UIA_LegacyIAccessibleRolePropertyId=30095
Global Const $UIA_LegacyIAccessibleStatePropertyId=30096
Global Const $UIA_LegacyIAccessibleHelpPropertyId=30097
Global Const $UIA_LegacyIAccessibleKeyboardShortcutPropertyId=30098
Global Const $UIA_LegacyIAccessibleSelectionPropertyId=30099
Global Const $UIA_LegacyIAccessibleDefaultActionPropertyId=30100
Global Const $UIA_AriaRolePropertyId=30101
Global Const $UIA_AriaPropertiesPropertyId=30102
Global Const $UIA_IsDataValidForFormPropertyId=30103
Global Const $UIA_ControllerForPropertyId=30104
Global Const $UIA_DescribedByPropertyId=30105
Global Const $UIA_FlowsToPropertyId=30106
Global Const $UIA_ProviderDescriptionPropertyId=30107
Global Const $UIA_IsItemContainerPatternAvailablePropertyId=30108
Global Const $UIA_IsVirtualizedItemPatternAvailablePropertyId=30109
Global Const $UIA_IsSynchronizedInputPatternAvailablePropertyId=30110

;~ The main object with acces to the windows automation api 3.0
Global $objUIAutomation = ObjCreateInterface($sCLSID_CUIAutomation, $sIID_IUIAutomation, $dtagIUIAutomation)
If IsObj($objUIAutomation) Then
    ConsoleWrite("At least it seems we have the core object to start with" & @CRLF)
EndIf

;~ Try to get the desktop as a generic reference/global for all samples
$objUIAutomation.GetRootElement($pDesktop)
;~ $oDesktop = ObjCreateInterface($pDesktop, $dtagIUIAutomationElement)
;~ If IsObj($oDesktop) Then
;~     ConsoleWrite("At least it seems I have the desktop as a frequently used starting point" & @CRLF)
;~ EndIf

$oDesktop = ObjCreateInterface($pDesktop, $sIID_IUIAutomationElement,$dtagIUIAutomationElement)
;~ $oDesktop = ObjCreateInterface($pDesktop, $sIID_IUIAutomationElement,"Default")


If IsObj($oDesktop) Then
    ConsoleWrite("At least it seems I have the desktop as a frequently used starting point"     & "[" & getPVal($oDesktop, $UIA_NamePropertyId) & "][" & getPVal($oDesktop, $UIA_ClassNamePropertyId) & "]" & @CRLF)
EndIf

$objUIAutomation.GetFocusedElement($pUIElement)
$oUIElement = ObjCreateInterface($pUIElement, $sIID_IUIAutomationElement, $dtagIUIAutomationElement)
If IsObj($oUIElement) Then
    ConsoleWrite("At least we have an focused element "     & "[" & getPVal($oUIElement, $UIA_NamePropertyId) & "][" & getPVal($oUIElement, $UIA_ClassNamePropertyId) & "]" & @CRLF)
EndIf

while True
    sleep(100)
WEnd

Func GetElementInfo()
Local $hWnd
Local $tStruct = DllStructCreate($tagPOINT) ; Create a structure that defines the point to be checked.
;~ Local $tStruct =_AutoItObject_DllStructCreate($tagPoint)

ToolTip("")

$x=MouseGetPos(0)
$y=MouseGetPos(1)
DllStructSetData($tStruct, "x", $x)
DllStructSetData($tStruct, "y", $y)
;~ consolewrite(DllStructGetData($tStruct,"x") & DllStructGetData($tStruct,"y"))
;~ consolewrite("Mouse position is retrieved " & @crlf)
$objUIAutomation.ElementFromPoint($tStruct,$pUIElement)
;~ $objUIAutomation.ElementFromPoint(DllStructGetPtr($tStruct),$pUIElement)
;~ consolewrite("Element from point is passed, trying to convert to object ")
$oUIElement = objcreateinterface($pUIElement,$sIID_IUIAutomationElement, $dtagIUIAutomationElement)
If IsObj($oUIElement) Then
    ConsoleWrite("At least we have an element "     & "[" & getPVal($oUIElement, $UIA_NamePropertyId) & "][" & getPVal($oUIElement, $UIA_ClassNamePropertyId) & "]" & @CRLF)

ConsoleWrite("All properties: " & @crlf & getAllPropertyValues($oUIElement))

EndIf

EndFunc ;==>Example

Func Close()
Exit
EndFunc ;==>Close

;~ Just return a single property or if its an array string them together
func getPVal($obj, $id)
    local $tval
    local $tStr
    local $aCall

     $obj.GetCurrentPropertyValue($Id,$tVal)
;~     $tVal=$aCall[2]
    $tStr=""
    if isarray($tVal) Then
        for $i=0 to ubound($tval)-1
            $tStr=$tStr & $tVal[$i]
            if $i <> ubound($tVal)-1 Then
                $tStr=$tStr & ";"
            endif
        Next
;~         consolewrite($id & " is an array")
        return $tStr
    endIf
    return $tVal
EndFunc
; ~ Just get all available properties for desktop/should work on all IUIAutomationElements depending on ControlTypePropertyID they work yes/no
; ~ Just make it a very long string name:= value pairs
func getAllPropertyValues($oUIElement)
    local $tStr, $tSeparator
    $tStr=""
    $tSeparator = @crLF ; To make sure its not a value you normally will get back for values
    $tStr=$tStr & "UIA_AcceleratorKeyPropertyId :=" & getPVal($oUIElement, $UIA_AcceleratorKeyPropertyId) & $tSeparator ; Shortcut key for the element's default action.
    $tStr=$tStr & "UIA_AccessKeyPropertyId :=" & getPVal($oUIElement, $UIA_AccessKeyPropertyId) & $tSeparator ; Keys used to move focus to a control.
    $tStr=$tStr & "UIA_AriaPropertiesPropertyId :=" & getPVal($oUIElement, $UIA_AriaPropertiesPropertyId) & $tSeparator ; A collection of Accessible Rich Internet Application (ARIA) properties, each consisting of a name/value pair delimited by ‘-’ and ‘ ; ’ (for example, ("checked=true ; disabled=false").
    $tStr=$tStr & "UIA_AriaRolePropertyId :=" & getPVal($oUIElement, $UIA_AriaRolePropertyId) & $tSeparator ; ARIA role information.
    $tStr=$tStr & "UIA_AutomationIdPropertyId :=" & getPVal($oUIElement, $UIA_AutomationIdPropertyId) & $tSeparator ; UI Automation identifier.
    $tStr=$tStr & "UIA_BoundingRectanglePropertyId :=" & getPVal($oUIElement, $UIA_BoundingRectanglePropertyId) & $tSeparator ; Coordinates of the rectangle that completely encloses the element.
    $tStr=$tStr & "UIA_ClassNamePropertyId :=" & getPVal($oUIElement, $UIA_ClassNamePropertyId) & $tSeparator ; Class name of the element as assigned by the control developer.
    $tStr=$tStr & "UIA_ClickablePointPropertyId :=" & getPVal($oUIElement, $UIA_ClickablePointPropertyId) & $tSeparator ; Screen coordinates of any clickable point within the control.
    $tStr=$tStr & "UIA_ControllerForPropertyId :=" & getPVal($oUIElement, $UIA_ControllerForPropertyId) & $tSeparator ; Array of elements controlled by the automation element that supports this property.
    $tStr=$tStr & "UIA_ControlTypePropertyId :=" & getPVal($oUIElement, $UIA_ControlTypePropertyId) & $tSeparator ; Control Type of the element.
    $tStr=$tStr & "UIA_CulturePropertyId :=" & getPVal($oUIElement, $UIA_CulturePropertyId) & $tSeparator ; Locale identifier of the element.
    $tStr=$tStr & "UIA_DescribedByPropertyId :=" & getPVal($oUIElement, $UIA_DescribedByPropertyId) & $tSeparator ; Array of elements that provide more information about the element.
    $tStr=$tStr & "UIA_DockDockPositionPropertyId :=" & getPVal($oUIElement, $UIA_DockDockPositionPropertyId) & $tSeparator ; Docking position.
    $tStr=$tStr & "UIA_ExpandCollapseExpandCollapseStatePropertyId :=" & getPVal($oUIElement, $UIA_ExpandCollapseExpandCollapseStatePropertyId) & $tSeparator ; The expand/collapse state.
    $tStr=$tStr & "UIA_FlowsToPropertyId :=" & getPVal($oUIElement, $UIA_FlowsToPropertyId) & $tSeparator ; Array of elements that suggest the reading order after the corresponding element.
    $tStr=$tStr & "UIA_FrameworkIdPropertyId :=" & getPVal($oUIElement, $UIA_FrameworkIdPropertyId) & $tSeparator ; Underlying UI framework that the element is part of.
    $tStr=$tStr & "UIA_GridColumnCountPropertyId :=" & getPVal($oUIElement, $UIA_GridColumnCountPropertyId) & $tSeparator ; Number of columns.
    $tStr=$tStr & "UIA_GridItemColumnPropertyId :=" & getPVal($oUIElement, $UIA_GridItemColumnPropertyId) & $tSeparator ; Column the item is in.
    $tStr=$tStr & "UIA_GridItemColumnSpanPropertyId :=" & getPVal($oUIElement, $UIA_GridItemColumnSpanPropertyId) & $tSeparator ; number of columns that the item spans.
    $tStr=$tStr & "UIA_GridItemContainingGridPropertyId :=" & getPVal($oUIElement, $UIA_GridItemContainingGridPropertyId) & $tSeparator ; UI Automation provider that implements IGridProvider and represents the container of the cell or item.
    $tStr=$tStr & "UIA_GridItemRowPropertyId :=" & getPVal($oUIElement, $UIA_GridItemRowPropertyId) & $tSeparator ; Row the item is in.
    $tStr=$tStr & "UIA_GridItemRowSpanPropertyId :=" & getPVal($oUIElement, $UIA_GridItemRowSpanPropertyId) & $tSeparator ; Number of rows that the item spzns.
    $tStr=$tStr & "UIA_GridRowCountPropertyId :=" & getPVal($oUIElement, $UIA_GridRowCountPropertyId) & $tSeparator ; Number of rows.
    $tStr=$tStr & "UIA_HasKeyboardFocusPropertyId :=" & getPVal($oUIElement, $UIA_HasKeyboardFocusPropertyId) & $tSeparator ; Whether the element has the keyboard focus.
    $tStr=$tStr & "UIA_HelpTextPropertyId :=" & getPVal($oUIElement, $UIA_HelpTextPropertyId) & $tSeparator ; Additional information about how to use the element.
    $tStr=$tStr & "UIA_IsContentElementPropertyId :=" & getPVal($oUIElement, $UIA_IsContentElementPropertyId) & $tSeparator ; Whether the element appears in the content view of the automation element tree.
    $tStr=$tStr & "UIA_IsControlElementPropertyId :=" & getPVal($oUIElement, $UIA_IsControlElementPropertyId) & $tSeparator ; Whether the element appears in the control view of the automation element tree.
    $tStr=$tStr & "UIA_IsDataValidForFormPropertyId :=" & getPVal($oUIElement, $UIA_IsDataValidForFormPropertyId) & $tSeparator ; Whether the data in a form is valid.
    $tStr=$tStr & "UIA_IsDockPatternAvailablePropertyId :=" & getPVal($oUIElement, $UIA_IsDockPatternAvailablePropertyId) & $tSeparator ; Whether the Dock control pattern is available on the element.
    $tStr=$tStr & "UIA_IsEnabledPropertyId :=" & getPVal($oUIElement, $UIA_IsEnabledPropertyId) & $tSeparator ; Whether the control is enabled.
    $tStr=$tStr & "UIA_IsExpandCollapsePatternAvailablePropertyId :=" & getPVal($oUIElement, $UIA_IsExpandCollapsePatternAvailablePropertyId) & $tSeparator ; Whether the ExpandCollapse control pattern is available on the element.
    $tStr=$tStr & "UIA_IsGridItemPatternAvailablePropertyId :=" & getPVal($oUIElement, $UIA_IsGridItemPatternAvailablePropertyId) & $tSeparator ; Whether the GridItem control pattern is available on the element.
    $tStr=$tStr & "UIA_IsGridPatternAvailablePropertyId :=" & getPVal($oUIElement, $UIA_IsGridPatternAvailablePropertyId) & $tSeparator ; Whether the Grid control pattern is available on the element.
    $tStr=$tStr & "UIA_IsInvokePatternAvailablePropertyId :=" & getPVal($oUIElement, $UIA_IsInvokePatternAvailablePropertyId) & $tSeparator ; Whether the Invoke control pattern is available on the element.
    $tStr=$tStr & "UIA_IsItemContainerPatternAvailablePropertyId :=" & getPVal($oUIElement, $UIA_IsItemContainerPatternAvailablePropertyId) & $tSeparator ; Whether the ItemContainer control pattern is available on the element.
    $tStr=$tStr & "UIA_IsKeyboardFocusablePropertyId :=" & getPVal($oUIElement, $UIA_IsKeyboardFocusablePropertyId) & $tSeparator ; Whether the element can accept the keyboard focus.
    $tStr=$tStr & "UIA_IsLegacyIAccessiblePatternAvailablePropertyId :=" & getPVal($oUIElement, $UIA_IsLegacyIAccessiblePatternAvailablePropertyId) & $tSeparator ; Whether the LegacyIAccessible control pattern is available on the control.
    $tStr=$tStr & "UIA_IsMultipleViewPatternAvailablePropertyId :=" & getPVal($oUIElement, $UIA_IsMultipleViewPatternAvailablePropertyId) & $tSeparator ; Whether the pattern is available on the control.
    $tStr=$tStr & "UIA_IsOffscreenPropertyId :=" & getPVal($oUIElement, $UIA_IsOffscreenPropertyId) & $tSeparator ; Whether the element is scrolled or collapsed out of view.
    $tStr=$tStr & "UIA_IsPasswordPropertyId :=" & getPVal($oUIElement, $UIA_IsPasswordPropertyId) & $tSeparator ; Whether the element contains protected content or a password.
    $tStr=$tStr & "UIA_IsRangeValuePatternAvailablePropertyId :=" & getPVal($oUIElement, $UIA_IsRangeValuePatternAvailablePropertyId) & $tSeparator ; Whether the RangeValue pattern is available on the control.
    $tStr=$tStr & "UIA_IsRequiredForFormPropertyId :=" & getPVal($oUIElement, $UIA_IsRequiredForFormPropertyId) & $tSeparator ; Whether the element is a required field on a form.
    $tStr=$tStr & "UIA_IsScrollItemPatternAvailablePropertyId :=" & getPVal($oUIElement, $UIA_IsScrollItemPatternAvailablePropertyId) & $tSeparator ; Whether the ScrollItem control pattern is available on the element.
    $tStr=$tStr & "UIA_IsScrollPatternAvailablePropertyId :=" & getPVal($oUIElement, $UIA_IsScrollPatternAvailablePropertyId) & $tSeparator ; Whether the Scroll control pattern is available on the element.
    $tStr=$tStr & "UIA_IsSelectionItemPatternAvailablePropertyId :=" & getPVal($oUIElement, $UIA_IsSelectionItemPatternAvailablePropertyId) & $tSeparator ; Whether the SelectionItem control pattern is available on the element.
    $tStr=$tStr & "UIA_IsSelectionPatternAvailablePropertyId :=" & getPVal($oUIElement, $UIA_IsSelectionPatternAvailablePropertyId) & $tSeparator ; Whether the pattern is available on the element.
    $tStr=$tStr & "UIA_IsSynchronizedInputPatternAvailablePropertyId :=" & getPVal($oUIElement, $UIA_IsSynchronizedInputPatternAvailablePropertyId) & $tSeparator ; Whether the SynchronizedInput control pattern is available on the element.
    $tStr=$tStr & "UIA_IsTableItemPatternAvailablePropertyId :=" & getPVal($oUIElement, $UIA_IsTableItemPatternAvailablePropertyId) & $tSeparator ; Whether the TableItem control pattern is available on the element.
    $tStr=$tStr & "UIA_IsTablePatternAvailablePropertyId :=" & getPVal($oUIElement, $UIA_IsTablePatternAvailablePropertyId) & $tSeparator ; Whether the Table conntrol pattern is available on the element.
    $tStr=$tStr & "UIA_IsTextPatternAvailablePropertyId :=" & getPVal($oUIElement, $UIA_IsTextPatternAvailablePropertyId) & $tSeparator ; Whether the Text control pattern is available on the element.
    $tStr=$tStr & "UIA_IsTogglePatternAvailablePropertyId :=" & getPVal($oUIElement, $UIA_IsTogglePatternAvailablePropertyId) & $tSeparator ; Whether the Toggle control pattern is available on the element.
    $tStr=$tStr & "UIA_IsTransformPatternAvailablePropertyId :=" & getPVal($oUIElement, $UIA_IsTransformPatternAvailablePropertyId) & $tSeparator ; Whether the Transform control pattern is available on the element.
    $tStr=$tStr & "UIA_IsValuePatternAvailablePropertyId :=" & getPVal($oUIElement, $UIA_IsValuePatternAvailablePropertyId) & $tSeparator ; Whether the Value control pattern is available on the element.
    $tStr=$tStr & "UIA_IsVirtualizedItemPatternAvailablePropertyId :=" & getPVal($oUIElement, $UIA_IsVirtualizedItemPatternAvailablePropertyId) & $tSeparator ; Whether the VirtualizedItem control pattern is available on the element.
    $tStr=$tStr & "UIA_IsWindowPatternAvailablePropertyId :=" & getPVal($oUIElement, $UIA_IsWindowPatternAvailablePropertyId) & $tSeparator ; Whether the Window control pattern is available on the element.
    $tStr=$tStr & "UIA_ItemStatusPropertyId :=" & getPVal($oUIElement, $UIA_ItemStatusPropertyId) & $tSeparator ; Control-specific status.
    $tStr=$tStr & "UIA_ItemTypePropertyId :=" & getPVal($oUIElement, $UIA_ItemTypePropertyId) & $tSeparator ; Description of the item type, such as "Document File" or "Folder".
    $tStr=$tStr & "UIA_LabeledByPropertyId :=" & getPVal($oUIElement, $UIA_LabeledByPropertyId) & $tSeparator ; Element that contains the text label for this element.
    $tStr=$tStr & "UIA_LegacyIAccessibleChildIdPropertyId :=" & getPVal($oUIElement, $UIA_LegacyIAccessibleChildIdPropertyId) & $tSeparator ; MSAA child ID of the element.
    $tStr=$tStr & "UIA_LegacyIAccessibleDefaultActionPropertyId :=" & getPVal($oUIElement, $UIA_LegacyIAccessibleDefaultActionPropertyId) & $tSeparator ; MSAA default action.
    $tStr=$tStr & "UIA_LegacyIAccessibleDescriptionPropertyId :=" & getPVal($oUIElement, $UIA_LegacyIAccessibleDescriptionPropertyId) & $tSeparator ; MSAA description.
    $tStr=$tStr & "UIA_LegacyIAccessibleHelpPropertyId :=" & getPVal($oUIElement, $UIA_LegacyIAccessibleHelpPropertyId) & $tSeparator ; MSAA help string.
    $tStr=$tStr & "UIA_LegacyIAccessibleKeyboardShortcutPropertyId :=" & getPVal($oUIElement, $UIA_LegacyIAccessibleKeyboardShortcutPropertyId) & $tSeparator ; MSAA shortcut key.
    $tStr=$tStr & "UIA_LegacyIAccessibleNamePropertyId :=" & getPVal($oUIElement, $UIA_LegacyIAccessibleNamePropertyId) & $tSeparator ; MSAA name.
    $tStr=$tStr & "UIA_LegacyIAccessibleRolePropertyId :=" & getPVal($oUIElement, $UIA_LegacyIAccessibleRolePropertyId) & $tSeparator ; MSAA role.
    $tStr=$tStr & "UIA_LegacyIAccessibleSelectionPropertyId :=" & getPVal($oUIElement, $UIA_LegacyIAccessibleSelectionPropertyId) & $tSeparator ; MSAA selection.
    $tStr=$tStr & "UIA_LegacyIAccessibleStatePropertyId :=" & getPVal($oUIElement, $UIA_LegacyIAccessibleStatePropertyId) & $tSeparator ; MSAA state.
    $tStr=$tStr & "UIA_LegacyIAccessibleValuePropertyId :=" & getPVal($oUIElement, $UIA_LegacyIAccessibleValuePropertyId) & $tSeparator ; MSAA value.
    $tStr=$tStr & "UIA_LocalizedControlTypePropertyId :=" & getPVal($oUIElement, $UIA_LocalizedControlTypePropertyId) & $tSeparator ; Localized string describing the control type of element.
    $tStr=$tStr & "UIA_MultipleViewCurrentViewPropertyId :=" & getPVal($oUIElement, $UIA_MultipleViewCurrentViewPropertyId) & $tSeparator ; Current view state of the control.
    $tStr=$tStr & "UIA_MultipleViewSupportedViewsPropertyId :=" & getPVal($oUIElement, $UIA_MultipleViewSupportedViewsPropertyId) & $tSeparator ; Supported control-specific views.
    $tStr=$tStr & "UIA_NamePropertyId :=" & getPVal($oUIElement, $UIA_NamePropertyId) & $tSeparator ; Name of the control.
    $tStr=$tStr & "UIA_NativeWindowHandlePropertyId :=" & getPVal($oUIElement, $UIA_NativeWindowHandlePropertyId) & $tSeparator ; Underlying HWND of the element, if one exists.
    $tStr=$tStr & "UIA_OrientationPropertyId :=" & getPVal($oUIElement, $UIA_OrientationPropertyId) & $tSeparator ; Orientation of the element.
    $tStr=$tStr & "UIA_ProcessIdPropertyId :=" & getPVal($oUIElement, $UIA_ProcessIdPropertyId) & $tSeparator ; Identifier of the process that the element resides in.
    $tStr=$tStr & "UIA_ProviderDescriptionPropertyId :=" & getPVal($oUIElement, $UIA_ProviderDescriptionPropertyId) & $tSeparator ; Description of the UI Automation provider.
    $tStr=$tStr & "UIA_RangeValueIsReadOnlyPropertyId :=" & getPVal($oUIElement, $UIA_RangeValueIsReadOnlyPropertyId) & $tSeparator ; Whether the value is read-only.
    $tStr=$tStr & "UIA_RangeValueLargeChangePropertyId :=" & getPVal($oUIElement, $UIA_RangeValueLargeChangePropertyId) & $tSeparator ; Amount by which the value is adjusted by input such as PgDn.
    $tStr=$tStr & "UIA_RangeValueMaximumPropertyId :=" & getPVal($oUIElement, $UIA_RangeValueMaximumPropertyId) & $tSeparator ; Maximum value in the range.
    $tStr=$tStr & "UIA_RangeValueMinimumPropertyId :=" & getPVal($oUIElement, $UIA_RangeValueMinimumPropertyId) & $tSeparator ; Minimum value in the range.
    $tStr=$tStr & "UIA_RangeValueSmallChangePropertyId :=" & getPVal($oUIElement, $UIA_RangeValueSmallChangePropertyId) & $tSeparator ; Amount by which the value is adjusted by input such as an arrow key.
    $tStr=$tStr & "UIA_RangeValueValuePropertyId :=" & getPVal($oUIElement, $UIA_RangeValueValuePropertyId) & $tSeparator ; Current value.
    $tStr=$tStr & "UIA_RuntimeIdPropertyId :=" & getPVal($oUIElement, $UIA_RuntimeIdPropertyId) & $tSeparator ; Run time identifier of the element.
    $tStr=$tStr & "UIA_ScrollHorizontallyScrollablePropertyId :=" & getPVal($oUIElement, $UIA_ScrollHorizontallyScrollablePropertyId) & $tSeparator ; Whether the control can be scrolled horizontally.
    $tStr=$tStr & "UIA_ScrollHorizontalScrollPercentPropertyId :=" & getPVal($oUIElement, $UIA_ScrollHorizontalScrollPercentPropertyId) & $tSeparator ; How far the element is currently scrolled.
    $tStr=$tStr & "UIA_ScrollHorizontalViewSizePropertyId :=" & getPVal($oUIElement, $UIA_ScrollHorizontalViewSizePropertyId) & $tSeparator ; The viewable width of the control.
    $tStr=$tStr & "UIA_ScrollVerticallyScrollablePropertyId :=" & getPVal($oUIElement, $UIA_ScrollVerticallyScrollablePropertyId) & $tSeparator ; Whether the control can be scrolled vertically.
    $tStr=$tStr & "UIA_ScrollVerticalScrollPercentPropertyId :=" & getPVal($oUIElement, $UIA_ScrollVerticalScrollPercentPropertyId) & $tSeparator ; How far the element is currently scrolled.
    $tStr=$tStr & "UIA_ScrollVerticalViewSizePropertyId :=" & getPVal($oUIElement, $UIA_ScrollVerticalViewSizePropertyId) & $tSeparator ; The viewable height of the control.
    $tStr=$tStr & "UIA_SelectionCanSelectMultiplePropertyId :=" & getPVal($oUIElement, $UIA_SelectionCanSelectMultiplePropertyId) & $tSeparator ; Whether multiple items can be in the selection.
    $tStr=$tStr & "UIA_SelectionIsSelectionRequiredPropertyId :=" & getPVal($oUIElement, $UIA_SelectionIsSelectionRequiredPropertyId) & $tSeparator ; Whether at least one item must be in the selection at all times.
    $tStr=$tStr & "UIA_Selecti&#111;nselectionPropertyId :=" & getPVal($oUIElement, $UIA_Selecti&#111;nselectionPropertyId) & $tSeparator ; The items in the selection.
    $tStr=$tStr & "UIA_SelectionItemIsSelectedPropertyId :=" & getPVal($oUIElement, $UIA_SelectionItemIsSelectedPropertyId) & $tSeparator ; Whether the item can be selected.
    $tStr=$tStr & "UIA_SelectionItemSelectionContainerPropertyId :=" & getPVal($oUIElement, $UIA_SelectionItemSelectionContainerPropertyId) & $tSeparator ; The control that contains the item.
    $tStr=$tStr & "UIA_TableColumnHeadersPropertyId :=" & getPVal($oUIElement, $UIA_TableColumnHeadersPropertyId) & $tSeparator ; Collection of column header providers.
    $tStr=$tStr & "UIA_TableItemColumnHeaderItemsPropertyId :=" & getPVal($oUIElement, $UIA_TableItemColumnHeaderItemsPropertyId) & $tSeparator ; Column headers.
    $tStr=$tStr & "UIA_TableRowHeadersPropertyId :=" & getPVal($oUIElement, $UIA_TableRowHeadersPropertyId) & $tSeparator ; Collection of row header providers.
    $tStr=$tStr & "UIA_TableRowOrColumnMajorPropertyId :=" & getPVal($oUIElement, $UIA_TableRowOrColumnMajorPropertyId) & $tSeparator ; Whether the table is primarily organized by row or column.
    $tStr=$tStr & "UIA_TableItemRowHeaderItemsPropertyId :=" & getPVal($oUIElement, $UIA_TableItemRowHeaderItemsPropertyId) & $tSeparator ; Row headers.
    $tStr=$tStr & "UIA_ToggleToggleStatePropertyId :=" & getPVal($oUIElement, $UIA_ToggleToggleStatePropertyId) & $tSeparator ; The toggle state of the control.
    $tStr=$tStr & "UIA_TransformCanMovePropertyId :=" & getPVal($oUIElement, $UIA_TransformCanMovePropertyId) & $tSeparator ; Whether the element can be moved.
    $tStr=$tStr & "UIA_TransformCanResizePropertyId :=" & getPVal($oUIElement, $UIA_TransformCanResizePropertyId) & $tSeparator ; Whether the element can be resized.
    $tStr=$tStr & "UIA_TransformCanRotatePropertyId :=" & getPVal($oUIElement, $UIA_TransformCanRotatePropertyId) & $tSeparator ; Whether the element can be rotated.
    $tStr=$tStr & "UIA_ValueIsReadOnlyPropertyId :=" & getPVal($oUIElement, $UIA_ValueIsReadOnlyPropertyId) & $tSeparator ; Whether the value is read-only.
    $tStr=$tStr & "UIA_ValueValuePropertyId :=" & getPVal($oUIElement, $UIA_ValueValuePropertyId) & $tSeparator ; Current value.
    $tStr=$tStr & "UIA_WindowCanMaximizePropertyId :=" & getPVal($oUIElement, $UIA_WindowCanMaximizePropertyId) & $tSeparator ; Whether the window can be maximized.
    $tStr=$tStr & "UIA_WindowCanMinimizePropertyId :=" & getPVal($oUIElement, $UIA_WindowCanMinimizePropertyId) & $tSeparator ; Whether the window can be minimized.
    $tStr=$tStr & "UIA_WindowIsModalPropertyId :=" & getPVal($oUIElement, $UIA_WindowIsModalPropertyId) & $tSeparator ; Whether the window is modal.
    $tStr=$tStr & "UIA_WindowIsTopmostPropertyId :=" & getPVal($oUIElement, $UIA_WindowIsTopmostPropertyId) & $tSeparator ; Whether the window is on top of other windows.
    $tStr=$tStr & "UIA_WindowWindowInteractionStatePropertyId :=" & getPVal($oUIElement, $UIA_WindowWindowInteractionStatePropertyId) & $tSeparator ; Whether the window can receive input.
    $tStr=$tStr & "UIA_WindowWindowVisualStatePropertyId :=" & getPVal($oUIElement, $UIA_WindowWindowVisualStatePropertyId) & $tSeparator ; Whether the window is maximized, minimized, or restored (normal).
    return $tStr
endFunc
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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