Jump to content

UIASpy - UI Automation Spy Tool


LarsJ
 Share

Recommended Posts

Thanks @junkew

So yep I live the life of quirks.  I was thinking at first a timing issue but appreciate the tip word 'focus'.  We get focus by changing the Edit value in notepad but not reading it's value. 

I was able to resolve this particular issue and will have to be aware of this in the future when using this type of automation.  Trick was I had to find the UIA handle of the Notepad window which is available in $UIA_NativeWindowHandlePropertyId then activate/focus the Notepad window (after correcting it since it returned in decimal notation)

#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7

#include "..\..\..\..\..\Includes\CUIAutomation2.au3"

Opt("MustDeclareVars", 1)

MsgBox(0, "Notice", "-- Make sure notepad is already open and visible before running this")
Example()

Func Example()
    ; Create UI Automation object (Done Once)
    Local $oUIAutomation = ObjCreateInterface($sCLSID_CUIAutomation, $sIID_IUIAutomation, $dtagIUIAutomation)
    If Not IsObj($oUIAutomation) Then Return ConsoleWrite("$oUIAutomation ERR" & @CRLF)

    ; Get Desktop element (Done Once)
    Local $pDesktop, $oDesktop
    $oUIAutomation.GetRootElement($pDesktop)
    $oDesktop = ObjCreateInterface($pDesktop, $sIID_IUIAutomationElement, $dtagIUIAutomationElement)
    If Not IsObj($oDesktop) Then Return ConsoleWrite("$oDesktop ERR" & @CRLF)

    ; --- Find Notepad window --- (Done Once)
          ConsoleWrite( "--- Find Notepad window ---" & @CRLF )
          Local $pCondition0
          $oUIAutomation.CreatePropertyCondition( $UIA_ClassNamePropertyId, "Notepad", $pCondition0 ) ; Create Condition
              If Not $pCondition0 Then Return ConsoleWrite( "$pCondition0 ERR" & @CRLF )
              ConsoleWrite( "$pCondition0 OK" & @CRLF )

          Local $pNotepad, $oNotepad
          $oDesktop.FindFirst( $TreeScope_Descendants, $pCondition0, $pNotepad ) ; From Condition Create Property
          $oNotepad = ObjCreateInterface( $pNotepad, $sIID_IUIAutomationElement, $dtagIUIAutomationElement ) ; From Property Create Object
                  If Not IsObj( $oNotepad ) Then Return ConsoleWrite( "$oNotepad ERR" & @CRLF )
                  ConsoleWrite( "$oNotepad OK" & @CRLF )


    ; Get the runtime ID of the element (Notepad handle)
    Local $pNativeWindowHandle
    $oNotepad.GetCurrentPropertyValue($UIA_NativeWindowHandlePropertyId, $pNativeWindowHandle)
    If @error Then
        ConsoleWrite("Error getting native window handle: " & @error & @CRLF)
    Else
        Local $iNativeWindowHandle = Int($pNativeWindowHandle)
        ConsoleWrite("Native Window Handle (Decimal): " & $iNativeWindowHandle & @CRLF)

        ; Convert the decimal handle to hexadecimal
        Local $sHexWindowHandle = Hex($iNativeWindowHandle)
        ConsoleWrite("Native Window Handle (Hex): 0x" & $sHexWindowHandle & @CRLF)

        WinActivate("[HANDLE:" & $sHexWindowHandle & "]")
        WinFlash("[HANDLE:" & $sHexWindowHandle & "]")
    EndIf
    ConsoleWrite("Moving past $oNotepad.GetCurrentPropertyValue Error Check" & @CRLF)

; --- Click File Menu ---
    ConsoleWrite("--- Click File Menu ---" & @CRLF)

    ; --- Find File Menu element ---
    Local $pConditionFileMenu
    $oUIAutomation.CreatePropertyCondition($UIA_NamePropertyId, "File", $pConditionFileMenu)
    If Not $pConditionFileMenu Then Return ConsoleWrite("$pConditionFileMenu ERR" & @CRLF)

    Local $pFileMenu, $oFileMenu
    $oNotepad.FindFirst($TreeScope_Descendants, $pConditionFileMenu, $pFileMenu)
    $oFileMenu = ObjCreateInterface($pFileMenu, $sIID_IUIAutomationElement, $dtagIUIAutomationElement)
    If Not IsObj($oFileMenu) Then Return ConsoleWrite("$oFileMenu ERR" & @CRLF)

    ; --- Invoke Click action on File Menu ---
    Local $pInvokePattern, $oInvokePattern
    $oFileMenu.GetCurrentPattern($UIA_InvokePatternId, $pInvokePattern)
    $oInvokePattern = ObjCreateInterface($pInvokePattern, $sIID_IUIAutomationInvokePattern, $dtagIUIAutomationInvokePattern)
    If Not IsObj($oInvokePattern) Then Return ConsoleWrite("$oInvokePattern ERR" & @CRLF)

    $oInvokePattern.Invoke()

EndFunc

 

 

Link to comment
Share on other sites

In the examples section in the top list you see the initial uiautomation thread and within the first 10 examples there is shown how you can walk the ui tree with treewalkers.

Basic approach

1. Find your mainwindow of interest

2. Find below the context of that mainwindow

a. Sacrifice a little speed by using findall or findfirst

b. Make it faster with treewalking with potential more complex coding

 

Link to comment
Share on other sites

Thanks @junkew OK I think I got what I need so far. For now I only needed one level deep. This seems to work for test1:

 

#include <GUIConstantsEx.au3>
#include <TreeViewConstants.au3>
#include <WindowsConstants.au3>
#include <MsgBoxConstants.au3>
#include "Required-AU\CUIAutomation2.au3"

TraverseOneLevel()

Func TraverseOneLevel()
        $oUIAutomation = CreateUIAutomation()
        $oDesktop = GetDesktopObject($oUIAutomation)
        Opt("WinTitleMatchMode", 3) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase

        If  WinExists("Word") Then
            ConsoleWrite("!Word Application Found" & @CRLF & "----------------------" & @CRLF)
            $oWord = GetObject($oUIAutomation, $oDesktop, $UIA_LegacyIAccessibleNamePropertyId, "Word")
        Else
            MsgBox($MB_TOPMOST,"Notice", "MS Word not found",2)
            Exit
        EndIf

        ; Create RawViewWalker object
        Local $pRawViewWalker, $oRawViewWalker
        $oUIAutomation.RawViewWalker( $pRawViewWalker )
        $oRawViewWalker = ObjCreateInterface( $pRawViewWalker, $sIID_IUIAutomationTreeWalker, $dtagIUIAutomationTreeWalker )
        If Not IsObj( $oRawViewWalker ) Then Return ConsoleWrite( "RawViewWalker object error" & @CRLF )

        Local $pSub
        $oRawViewWalker.GetFirstChildElement($oWord, $pSub) ; $UIA_pUIElement)
        local $oUIElement = ObjCreateInterface($pSub, $sIID_IUIAutomationElement, $dtagIUIAutomationElement)
        $i=0
        While IsObj($oUIElement) = True
            ConsoleWrite($i & _
                                        "Type= " & getText($oUIElement, $UIA_LocalizedControlTypePropertyId) & @TAB & _
                                        "Handle= " & Hex(getText($oUIElement, $UIA_NativeWindowHandlePropertyId)) & @TAB & _
                                        "Class= " & StringFormat("%-45s", getText($oUIElement, $uia_classnamepropertyid)) & @TAB & _
                                        "Title= " & getText($oUIElement, $UIA_NamePropertyId) & @TAB & _
                                         @CRLF)

            $oRawViewWalker.GetNextSiblingElement($oUIElement, $pSub)
            $oUIElement = ObjCreateInterface($pSub, $sIID_IUIAutomationElement, $dtagIUIAutomationElement)
            $i=$i+1
        WEnd
        ConsoleWrite("----" & @CRLF)
EndFunc   ;==>TraverseOneLevel

Func CreateUIAutomation()
    ConsoleWrite("--- Creating UI Automation Object ---" & @CRLF)
    Local $oUIAutomation = ObjCreateInterface($sCLSID_CUIAutomation, $sIID_IUIAutomation, $dtagIUIAutomation)
    If Not IsObj($oUIAutomation) Then
        Return ConsoleWrite("$oUIAutomation ERR" & @CRLF)
    EndIf
    ConsoleWrite("$oUIAutomation OK" & @CRLF)
    Return  $oUIAutomation
EndFunc

Func GetDesktopObject($oUIAutomation)
    ConsoleWrite("--- Getting Desktop Element ---" & @CRLF)
    Local $pDesktop
    $oUIAutomation.GetRootElement($pDesktop)
    Local $oDesktop = ObjCreateInterface($pDesktop, $sIID_IUIAutomationElement, $dtagIUIAutomationElement)
    If Not IsObj($oDesktop) Then
        Return ConsoleWrite("$oDesktop ERR" & @CRLF)
    EndIf
    ConsoleWrite("$oDesktop OK" & @CRLF)
    Return $oDesktop
EndFunc

Func GetObject($oUIAutomation,$oGiven, $property1, $Value1)
    ConsoleWrite("--- Finding " & $Value1 & " Window ---" & @CRLF)
    If IsObj($oGiven) Then

            Local $pCondition0
            $oUIAutomation.CreatePropertyCondition($property1, $Value1, $pCondition0)
                    If Not $pCondition0 Then
                        ConsoleWrite("$pCondition0 ERR" & @CRLF)
                        Return 0
                    EndIf

            Local $pObject
            $oGiven.FindFirst($TreeScope_Descendants, $pCondition0, $pObject)
            Local $oSub = ObjCreateInterface($pObject, $sIID_IUIAutomationElement, $dtagIUIAutomationElement)
                    If Not IsObj($oSub) Then
                        ConsoleWrite("$oSub " & $Value1 & " ERR" & @CRLF)
                        Return 0
                    EndIf
            ConsoleWrite("$oSub " & $Value1 & " OK" & @CRLF)
            GetText($oSub,$property1)
            Return $oSub
    Else
            Return 0
    EndIf
EndFunc

Func GetText($oControlToGetTextFrom, $property1)
        Local $sValue
        $oControlToGetTextFrom.GetCurrentPropertyValue($property1, $sValue)
        Return $sValue
EndFunc

 

Edited by NassauSky
Link to comment
Share on other sites

  • 5 months later...

Hello i have the following error someone know how to fix ?
i am using win7:

"C:\Program Files (x86)\AutoIt3\Include\UIASpy_Arrays.au3" (108) : ==> Variable used without being declared.:


 

Global Const $aElemDetailsArr[490][6] = [ [ "Treeview Element",                                  "",                      0xFFFFE0 ], [ "",                                                  "",                      0x000000 ], [ "Element Properties (identification)",               "",                      0xFFFFE0, "",       "https://docs.microsoft.com/en-us/windows/desktop/winauto/uiauto-automation-element-propids" ], [ "",                                                  "",                      0x000000 ], [ "Element Properties (session unique)",               "",                      0xFFFFE0, "",       "https://docs.microsoft.com/en-us/windows/desktop/winauto/uiauto-automation-element-propids" ], [ "",                                                  "",                      0x000000 ], [ "Element Properties (information)",                  "",                      0xFFFFE0, "",       "https://docs.microsoft.com/en-us/windows/desktop/winauto/uiauto-automation-element-propids" ], [ "",                                                  "",                      0x000000 ], [ "Element Properties (has/is info)",                  "",                      0xFFFFE0, "",       "https://docs.microsoft.com/en-us/windows/desktop/winauto/uiauto-automation-element-propids" ], [ "",                                                  "",                      0x000000 ], [ "Element Properties (default value)",                "",                      0xCCCCFF, "",       "https://docs.microsoft.com/en-us/windows/desktop/winauto/uiauto-automation-element-propids" ], [ "$UIA_AcceleratorKeyPropertyId",                     ""                       ], [ "$UIA_AccessKeyPropertyId",                          ""                       ], [ "$UIA_AnnotationObjectsPropertyId",                  ""                       ], [ "$UIA_AnnotationTypesPropertyId",                    ""                       ], [ "$UIA_AriaPropertiesPropertyId",                     ""                       ], [ "$UIA_AriaRolePropertyId",                           ""                       ], [ "$UIA_AutomationIdPropertyId",                       "",                      0x000000, 0xCCFFFF, "",        "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1419507" ], [ "$UIA_BoundingRectanglePropertyId",                  "",                      0x000000, 0xCCFFFF, "",        "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1419507" ], [ "$UIA_BoundingRectanglePropertyId (scaled)"          ], [ "$UIA_CenterPointPropertyId",                        ""                       ], [ "$UIA_ClassNamePropertyId",                          "",                      0x000000, 0xCCFFFF, "",        "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1419507" ], [ "$UIA_ClickablePointPropertyId",                     ""                       ], [ "$UIA_ControllerForPropertyId"                       ], [ "$UIA_ControlTypePropertyId",                        $UIA_CustomControlTypeId ], [ "$UIA_CulturePropertyId",                            0                        ], [ "$UIA_DescribedByPropertyId"                         ], [ "$UIA_FillColorPropertyId",                          0                        ], [ "$UIA_FillTypePropertyId",                           0                        ], [ "$UIA_FlowsFromPropertyId"                           ], [ "$UIA_FlowsToPropertyId"                             ], [ "$UIA_FrameworkIdPropertyId",                        ""                       ], [ "$UIA_FullDescriptionPropertyId",                    ""                       ], [ "$UIA_HasKeyboardFocusPropertyId",                   -1                       ], [ "$UIA_HeadingLevelPropertyId",                       0                        ], [ "$UIA_HelpTextPropertyId",                           ""                       ], [ "$UIA_IsContentElementPropertyId",                   -1                       ], [ "$UIA_IsControlElementPropertyId",                   -1                       ], [ "$UIA_IsDataValidForFormPropertyId",                 -1                       ], [ "$UIA_IsDialogPropertyId",                           -1                       ], [ "$UIA_IsEnabledPropertyId",                          -1                       ], [ "$UIA_IsKeyboardFocusablePropertyId",                -1                       ], [ "$UIA_IsOffscreenPropertyId",                        -1                       ], [ "$UIA_IsPasswordPropertyId",                         -1                       ], [ "$UIA_IsPeripheralPropertyId",                       -1                       ], [ "$UIA_IsRequiredForFormPropertyId",                  -1                       ], [ "$UIA_ItemStatusPropertyId",                         ""                       ], [ "$UIA_ItemTypePropertyId",                           ""                       ], [ "$UIA_LabeledByPropertyId",                          NULL                     ], [ "$UIA_LandmarkTypePropertyId",                       0                        ], [ "$UIA_LevelPropertyId",                              0                        ], [ "$UIA_LiveSettingPropertyId",                        0                        ], [ "$UIA_LocalizedControlTypePropertyId",               ""                       ], [ "$UIA_LocalizedLandmarkTypePropertyId",              ""                       ], [ "$UIA_NamePropertyId",                               ""                       ], [ "$UIA_NativeWindowHandlePropertyId",                 0                        ], [ "$UIA_OptimizeForVisualContentPropertyId",           -1                       ], [ "$UIA_OrientationPropertyId",                        0                        ], [ "$UIA_OutlineColorPropertyId",                       0                        ], [ "$UIA_OutlineThicknessPropertyId",                   ""                       ], [ "$UIA_PositionInSetPropertyId",                      0                        ], [ "$UIA_ProcessIdPropertyId",                          0                        ], [ "$UIA_ProviderDescriptionPropertyId",                ""                       ], [ "$UIA_RotationPropertyId",                           0.0                      ], [ "$UIA_RuntimeIdPropertyId"                           ], [ "$UIA_SizePropertyId",                               ""                       ], [ "$UIA_SizeOfSetPropertyId",                          0                        ], [ "$UIA_VisualEffectsPropertyId",                      0                        ], [ "",                                                  "",                      0x000000 ], [ "Control Patterns (element actions)",                "",                      0xFFFFE0, "",       "https://docs.microsoft.com/en-us/windows/desktop/winauto/uiauto-controlpatternsoverview" ], [ "",                                                  "",                      0x000000 ], [ "Control Patterns (unavailable)",                    "",                      0xCCCCFF, "",       "https://docs.microsoft.com/en-us/windows/desktop/winauto/uiauto-controlpatternsoverview" ], [ "$UIA_IsAnnotationPatternAvailablePropertyId",       "",                      "", 0xE8E8E8,       "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nn-uiautomationclient-iuiautomationannotationpattern"                ], [ "$UIA_IsCustomNavigationPatternAvailablePropertyId", "",                      "", 0xE8E8E8,       "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationcustomnavigationpattern-navigate" ], [ "$UIA_IsDockPatternAvailablePropertyId",             "",                      "", 0xE8E8E8,       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationdockpattern"                      ], [ "$UIA_IsDragPatternAvailablePropertyId",             "",                      "", 0xE8E8E8,       "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nn-uiautomationclient-iuiautomationdragpattern"                      ], [ "$UIA_IsDropTargetPatternAvailablePropertyId",       "",                      "", 0xE8E8E8,       "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nn-uiautomationclient-iuiautomationdroptargetpattern"                ], [ "$UIA_IsExpandCollapsePatternAvailablePropertyId",   "",                      "", 0xCCFFFF,       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationexpandcollapsepattern",           "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1420941" ], [ "$UIA_IsGridPatternAvailablePropertyId",             "",                      "", 0xCCFFFF,       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationgridpattern",                     "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1420941" ], [ "$UIA_IsGridItemPatternAvailablePropertyId",         "",                      "", 0xE8E8E8,       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationgriditempattern"                  ], [ "$UIA_IsInvokePatternAvailablePropertyId",           "",                      "", 0xCCFFFF,       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationinvokepattern",                   "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1420941" ], [ "$UIA_IsItemContainerPatternAvailablePropertyId",    "",                      "", 0xCCFFFF,       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationitemcontainerpattern",            "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1421955" ], [ "$UIA_IsLegacyIAccessiblePatternAvailablePropertyId","",                      "", 0xE8E8E8,       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationlegacyiaccessiblepattern"         ], [ "$UIA_IsMultipleViewPatternAvailablePropertyId",     "",                      "", 0xCCFFFF,       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationmultipleviewpattern",             "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1420941" ], [ "$UIA_IsObjectModelPatternAvailablePropertyId",      "",                      "", 0xE8E8E8,       "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nn-uiautomationclient-iuiautomationobjectmodelpattern"               ], [ "$UIA_IsRangeValuePatternAvailablePropertyId",       "",                      "", 0xE8E8E8,       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationrangevaluepattern"                ], [ "$UIA_IsScrollPatternAvailablePropertyId",           "",                      "", 0xCCFFFF,       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationscrollpattern",                   "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1420941" ], [ "$UIA_IsScrollItemPatternAvailablePropertyId",       "",                      "", 0xCCFFFF,       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationscrollitempattern",               "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1420941" ], [ "$UIA_IsSelectionPatternAvailablePropertyId",        "",                      "", 0xCCFFFF,       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationselectionpattern",                "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1420941" ], [ "$UIA_IsSelectionItemPatternAvailablePropertyId",    "",                      "", 0xCCFFFF,       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationselectionitempattern",            "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1420941" ], [ "$UIA_IsSelectionPattern2AvailablePropertyId",       "",                      "", 0xE8E8E8,       "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nn-uiautomationclient-iuiautomationselectionpattern2"                ], [ "$UIA_IsSpreadsheetPatternAvailablePropertyId",      "",                      "", 0xE8E8E8,       "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nn-uiautomationclient-iuiautomationspreadsheetpattern"               ], [ "$UIA_IsSpreadsheetItemPatternAvailablePropertyId",  "",                      "", 0xE8E8E8,       "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nn-uiautomationclient-iuiautomationspreadsheetitempattern"           ], [ "$UIA_IsStylesPatternAvailablePropertyId",           "",                      "", 0xE8E8E8,       "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nn-uiautomationclient-iuiautomationstylespattern"                    ], [ "$UIA_IsSynchronizedInputPatternAvailablePropertyId","",                      "", 0xE8E8E8,       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationsynchronizedinputpattern"         ], [ "$UIA_IsTablePatternAvailablePropertyId",            "",                      "", 0xCCFFFF,       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationtablepattern",                    "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1420941" ], [ "$UIA_IsTableItemPatternAvailablePropertyId",        "",                      "", 0xE8E8E8,       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationtableitempattern"                 ], [ "$UIA_IsTextPatternAvailablePropertyId",             "",                      "", 0xE8E8E8,       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationtextpattern"                      ], [ "$UIA_IsTextPattern2AvailablePropertyId",            "",                      "", 0xE8E8E8,       "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nn-uiautomationclient-iuiautomationtextpattern2"                     ], [ "$UIA_IsTextChildPatternAvailablePropertyId",        "",                      "", 0xE8E8E8,       "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nn-uiautomationclient-iuiautomationtextchildpattern"                 ], [ "$UIA_IsTextEditPatternAvailablePropertyId",         "",                      "", 0xE8E8E8,       "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nn-uiautomationclient-iuiautomationtexteditpattern"                  ], [ "$UIA_IsTogglePatternAvailablePropertyId",           "",                      "", 0xE8E8E8,       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationtogglepattern"                    ], [ "$UIA_IsTransformPatternAvailablePropertyId",        "",                      "", 0xCCFFFF,       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationtransformpattern",                "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1420941" ], [ "$UIA_IsTransformPattern2AvailablePropertyId",       "",                      "", 0xE8E8E8,       "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nn-uiautomationclient-iuiautomationtransformpattern2"                ], [ "$UIA_IsValuePatternAvailablePropertyId",            "",                      "", 0xCCFFFF,       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationvaluepattern",                    "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1419507" ], [ "$UIA_IsVirtualizedItemPatternAvailablePropertyId",  "",                      "", 0xCCFFFF,       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationvirtualizeditempattern",          "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1421955" ], [ "$UIA_IsWindowPatternAvailablePropertyId",           "",                      "", 0xCCFFFF,       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationwindowpattern",                   "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1420941" ], [ "",                                                  "",                      0x000000 ], [ "Control Pattern Properties",                        "",                      0xFFFFE0, "",       "https://docs.microsoft.com/en-us/windows/desktop/winauto/uiauto-control-pattern-propids" ], [ "",                                                  "",                      0x000000 ], [ "Control Pattern Properties (unavailable patterns)", "",                      0xCCCCFF, "",       "https://docs.microsoft.com/en-us/windows/desktop/winauto/uiauto-control-pattern-propids" ], [ "$UIA_AnnotationAnnotationTypeIdPropertyId",         43+29                    ], [ "$UIA_AnnotationAnnotationTypeNamePropertyId",       43+29                    ], [ "$UIA_AnnotationAuthorPropertyId",                   43+29                    ], [ "$UIA_AnnotationDateTimePropertyId",                 43+29                    ], [ "$UIA_AnnotationTargetPropertyId",                   43+29                    ], [ "$UIA_DockDockPositionPropertyId",                   43+31                    ], [ "$UIA_DragDropEffectPropertyId",                     43+32                    ], [ "$UIA_DragDropEffectsPropertyId",                    43+32                    ], [ "$UIA_DragGrabbedItemsPropertyId",                   43+32                    ], [ "$UIA_DragIsGrabbedPropertyId",                      43+32                    ], [ "$UIA_DropTargetDropTargetEffectPropertyId",         43+33                    ], [ "$UIA_DropTargetDropTargetEffectsPropertyId",        43+33                    ], [ "$UIA_ExpandCollapseExpandCollapseStatePropertyId",  44+33                    ], [ "$UIA_GridColumnCountPropertyId",                    45+33                    ], [ "$UIA_GridRowCountPropertyId",                       45+33                    ], [ "$UIA_GridItemColumnPropertyId",                     46+33                    ], [ "$UIA_GridItemColumnSpanPropertyId",                 46+33                    ], [ "$UIA_GridItemContainingGridPropertyId",             46+33                    ], [ "$UIA_GridItemRowPropertyId",                        46+33                    ], [ "$UIA_GridItemRowSpanPropertyId",                    46+33                    ], [ "$UIA_LegacyIAccessibleChildIdPropertyId",           49+33                    ], [ "$UIA_LegacyIAccessibleDefaultActionPropertyId",     49+33                    ], [ "$UIA_LegacyIAccessibleDescriptionPropertyId",       49+33                    ], [ "$UIA_LegacyIAccessibleHelpPropertyId",              49+33                    ], [ "$UIA_LegacyIAccessibleKeyboardShortcutPropertyId",  49+33                    ], [ "$UIA_LegacyIAccessibleNamePropertyId",              49+33                    ], [ "$UIA_LegacyIAccessibleRolePropertyId",              49+33                    ], [ "$UIA_LegacyIAccessibleSelectionPropertyId",         49+33                    ], [ "$UIA_LegacyIAccessibleStatePropertyId",             49+33                    ], [ "$UIA_LegacyIAccessibleValuePropertyId",             49+33                    ], [ "$UIA_MultipleViewCurrentViewPropertyId",            50+33                    ], [ "$UIA_MultipleViewSupportedViewsPropertyId",         50+33                    ], [ "$UIA_RangeValueIsReadOnlyPropertyId",               51+34                    ], [ "$UIA_RangeValueLargeChangePropertyId",              51+34                    ], [ "$UIA_RangeValueMaximumPropertyId",                  51+34                    ], [ "$UIA_RangeValueMinimumPropertyId",                  51+34                    ], [ "$UIA_RangeValueSmallChangePropertyId",              51+34                    ], [ "$UIA_RangeValueValuePropertyId",                    51+34                    ], [ "$UIA_ScrollHorizontallyScrollablePropertyId",       52+34                    ], [ "$UIA_ScrollHorizontalScrollPercentPropertyId",      52+34                    ], [ "$UIA_ScrollHorizontalViewSizePropertyId",           52+34                    ], [ "$UIA_ScrollVerticallyScrollablePropertyId",         52+34                    ], [ "$UIA_ScrollVerticalScrollPercentPropertyId",        52+34                    ], [ "$UIA_ScrollVerticalViewSizePropertyId",             52+34                    ], [ "$UIA_SelectionCanSelectMultiplePropertyId",         54+34                    ], [ "$UIA_SelectionIsSelectionRequiredPropertyId",       54+34                    ], [ "$UIA_SelectionSelectionPropertyId",                 54+34                    ], [ "$UIA_SelectionItemIsSelectedPropertyId",            55+34                    ], [ "$UIA_SelectionItemSelectionContainerPropertyId",    55+34                    ], [ "$UIA_SelectionCanSelectMultiplePropertyId",         55+35                    ], [ "$UIA_SelectionIsSelectionRequiredPropertyId",       55+35                    ], [ "$UIA_SelectionSelectionPropertyId",                 55+35                    ], [ "$UIA_Selection2FirstSelectedItemPropertyId",        55+35                    ], [ "$UIA_Selection2LastSelectedItemPropertyId",         55+35                    ], [ "$UIA_Selection2CurrentSelectedItemPropertyId",      55+35                    ], [ "$UIA_Selection2ItemCountPropertyId",                55+35                    ], [ "$UIA_SpreadsheetItemAnnotationObjectsPropertyId",   55+37                    ], [ "$UIA_SpreadsheetItemAnnotationTypesPropertyId",     55+37                    ], [ "$UIA_SpreadsheetItemFormulaPropertyId",             55+37                    ], [ "$UIA_StylesExtendedPropertiesPropertyId",           55+38                    ], [ "$UIA_StylesFillColorPropertyId",                    55+38                    ], [ "$UIA_StylesFillPatternColorPropertyId",             55+38                    ], [ "$UIA_StylesFillPatternStylePropertyId",             55+38                    ], [ "$UIA_StylesShapePropertyId",                        55+38                    ], [ "$UIA_StylesStyleIdPropertyId",                      55+38                    ], [ "$UIA_StylesStyleNamePropertyId",                    55+38                    ], [ "$UIA_TableColumnHeadersPropertyId",                 57+38                    ], [ "$UIA_TableRowHeadersPropertyId",                    57+38                    ], [ "$UIA_TableRowOrColumnMajorPropertyId",              57+38                    ], [ "$UIA_TableItemColumnHeaderItemsPropertyId",         58+38                    ], [ "$UIA_TableItemRowHeaderItemsPropertyId",            58+38                    ], [ "$UIA_ToggleToggleStatePropertyId",                  60+41                    ], [ "$UIA_TransformCanMovePropertyId",                   61+41                    ], [ "$UIA_TransformCanResizePropertyId",                 61+41                    ], [ "$UIA_TransformCanRotatePropertyId",                 61+41                    ], [ "$UIA_TransformCanMovePropertyId",                   61+42                    ], [ "$UIA_TransformCanResizePropertyId",                 61+42                    ], [ "$UIA_TransformCanRotatePropertyId",                 61+42                    ], [ "$UIA_Transform2CanZoomPropertyId",                  61+42                    ], [ "$UIA_Transform2ZoomLevelPropertyId",                61+42                    ], [ "$UIA_Transform2ZoomMaximumPropertyId",              61+42                    ], [ "$UIA_Transform2ZoomMinimumPropertyId",              61+42                    ], [ "$UIA_ValueIsReadOnlyPropertyId",                    62+42                    ], [ "$UIA_ValueValuePropertyId",                         62+42,                   0x000000, 0xCCFFFF, "",        "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1419507" ], [ "$UIA_WindowCanMaximizePropertyId",                  64+42                    ], [ "$UIA_WindowCanMinimizePropertyId",                  64+42                    ], [ "$UIA_WindowIsModalPropertyId",                      64+42                    ], [ "$UIA_WindowIsTopmostPropertyId",                    64+42                    ], [ "$UIA_WindowWindowInteractionStatePropertyId",       64+42                    ], [ "$UIA_WindowWindowVisualStatePropertyId",            64+42                    ], [ "",                                                  "",                      0x000000 ], [ "Control Pattern Methods",                           "",                      0xFFFFE0, "",       "https://docs.microsoft.com/en-us/windows/desktop/winauto/uiauto-controlpatternsoverview" ], [ "",                                                  "",                      0x000000 ], [ "Control Pattern Methods (unavailable patterns)",    "",                      0xCCCCFF, "",       "https://docs.microsoft.com/en-us/windows/desktop/winauto/uiauto-controlpatternsoverview" ], [ "Annotation Pattern Methods",                        43+29,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nn-uiautomationclient-iuiautomationannotationpattern"                                    ], [ "get_CurrentAnnotationTypeId(int*)",                 43+29,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationannotationpattern-get_currentannotationtypeid"        ], [ "get_CurrentAnnotationTypeName(bstr*)",              43+29,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationannotationpattern-get_currentannotationtypename"      ], [ "get_CurrentAuthor(bstr*)",                          43+29,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationannotationpattern-get_currentauthor"                  ], [ "get_CurrentDateTime(bstr*)",                        43+29,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationannotationpattern-get_currentdatetime"                ], [ "get_CurrentTarget(ptr*)",                           43+29,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationannotationpattern-get_currenttarget"                  ], [ "CustomNavigation Pattern Methods",                  43+30,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nn-uiautomationclient-iuiautomationcustomnavigationpattern"                              ], [ "Navigate(long;ptr*)",                               43+30,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationcustomnavigationpattern-navigate"                     ], [ "Dock Pattern Methods",                              43+31,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationdockpattern"                                          ], [ "SetDockPosition(long)",                             43+31,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nf-uiautomationclient-iuiautomationdockpattern-setdockposition"                          ], [ "CurrentDockPosition(long*)",                        43+31,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nf-uiautomationclient-iuiautomationdockpattern-get_currentdockposition"                  ], [ "Drag Pattern Methods",                              43+32,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nn-uiautomationclient-iuiautomationdragpattern"                                          ], [ "get_CurrentIsGrabbed(bool*)",                       43+32,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationdragpattern-get_currentisgrabbed"                     ], [ "get_CurrentDropEffect(bstr*)",                      43+32,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationdragpattern-get_currentdropeffect"                    ], [ "get_CurrentDropEffects(ptr*)",                      43+32,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationdragpattern-get_currentdropeffects"                   ], [ "GetCurrentGrabbedItems(ptr*)",                      43+32,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationdragpattern-getcurrentgrabbeditems"                   ], [ "DropTarget Pattern Methods",                        43+33,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nn-uiautomationclient-iuiautomationdroptargetpattern"                                    ], [ "get_CurrentDropTargetEffect(bstr*)",                43+33,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationdroptargetpattern-get_currentdroptargeteffect"        ], [ "get_CurrentDropTargetEffects(ptr*)",                43+33,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationdroptargetpattern-get_currentdroptargeteffects"       ], [ "ExpandCollapse Pattern Methods",                    44+33,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationexpandcollapsepattern"                                ], [ "Expand()",                                          44+33,                   "",       0xCCFFFF, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationexpandcollapsepattern-expand",                        "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1420941" ], [ "Collapse()",                                        44+33,                   "",       0xCCFFFF, "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nf-uiautomationclient-iuiautomationexpandcollapsepattern-collapse",                      "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1420941" ], [ "CurrentExpandCollapseState($iState*)",              44+33,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationexpandcollapsepattern-get_currentexpandcollapsestate" ], [ "Grid Pattern Methods",                              45+33,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationgridpattern"                                          ], [ "GetItem($iRow,$iColumn,$pUIElement*)",              45+33,                   "",       0xCCFFFF, "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nf-uiautomationclient-iuiautomationgridpattern-getitem",                                 "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1420941" ], [ "CurrentRowCount($iRows*)",                          45+33,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationgridpattern-get_currentrowcount"                      ], [ "CurrentColumnCount($iColumns*)",                    45+33,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationgridpattern-get_currentcolumncount"                   ], [ "GridItem Pattern Methods",                          46+33,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationgriditempattern"                                      ], [ "CurrentColumn(int*)",                               46+33,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nf-uiautomationclient-iuiautomationgriditempattern-get_currentcolumn"                    ], [ "CurrentColumnSpan(int*)",                           46+33,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationgriditempattern-get_currentcolumnspan"                ], [ "CurrentContainingGrid(ptr*)",                       46+33,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationgriditempattern-get_currentcontaininggrid"            ], [ "CurrentRow(int*)",                                  46+33,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationgriditempattern-get_currentrow"                       ], [ "CurrentRowSpan(int*)",                              46+33,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationgriditempattern-get_currentrowspan"                   ], [ "Invoke Pattern Methods",                            47+33,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationinvokepattern"                                        ], [ "Invoke()",                                          47+33,                   "",       0xCCFFFF, "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nf-uiautomationclient-iuiautomationinvokepattern-invoke",                                "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1420941" ], [ "ItemContainer Pattern Methods",                     48+33,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationitemcontainerpattern"                                 ], [ "FindItemByProperty($pUIElement,$iUIA_PropertyId,$vPropVal,pUIElement*)",     48+33,"", 0xCCFFFF, "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nf-uiautomationclient-iuiautomationitemcontainerpattern-finditembyproperty",             "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1421955" ], [ "LegacyIAccessible Pattern Methods",                 49+33,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationlegacyiaccessiblepattern"                             ], [ "DoDefaultAction()",                                 49+33,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nf-uiautomationclient-iuiautomationlegacyiaccessiblepattern-dodefaultaction"             ], [ "Select(long)",                                      49+33,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationlegacyiaccessiblepattern-select"                      ], [ "SetValue(wstr)",                                    49+33,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationlegacyiaccessiblepattern-setvalue"                    ], [ "GetIAccessible(idispatch*)",                        49+33,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationlegacyiaccessiblepattern-getiaccessible"              ], [ "CurrentChildId(int*)",                              49+33,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationlegacyiaccessiblepattern-get_currentchildid"          ], [ "CurrentDefaultAction(bstr*)",                       49+33,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationlegacyiaccessiblepattern-get_currentdefaultaction"    ], [ "CurrentDescription(bstr*)",                         49+33,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationlegacyiaccessiblepattern-get_currentdescription"      ], [ "CurrentHelp(bstr*)",                                49+33,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationlegacyiaccessiblepattern-get_currenthelp"             ], [ "CurrentKeyboardShortcut(bstr*)",                    49+33,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationlegacyiaccessiblepattern-get_currentkeyboardshortcut" ], [ "CurrentName(bstr*)",                                49+33,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationlegacyiaccessiblepattern-get_currentname"             ], [ "CurrentRole(uint*)",                                49+33,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationlegacyiaccessiblepattern-get_currentrole"             ], [ "CurrentState(uint*)",                               49+33,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationlegacyiaccessiblepattern-get_currentstate"            ], [ "CurrentValue(bstr*)",                               49+33,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationlegacyiaccessiblepattern-get_currentvalue"            ], [ "GetCurrentSelection(ptr*)",                         49+33,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nf-uiautomationclient-iuiautomationlegacyiaccessiblepattern-getcurrentselection"         ], [ "MultipleView Pattern Methods",                      50+33,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationmultipleviewpattern"                                  ], [ "GetViewName($iViewId,$sViewName*)",                 50+33,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nf-uiautomationclient-iuiautomationmultipleviewpattern-getviewname"                      ], [ "SetCurrentView($iViewId)",                          50+33,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationmultipleviewpattern-setcurrentview"                   ], [ "CurrentCurrentView($iViewId*)",                     50+33,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationmultipleviewpattern-get_currentcurrentview"           ], [ "GetCurrentSupportedViews($pSafeArray*)",            50+33,                   "",       0xCCFFFF, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationmultipleviewpattern-getcurrentsupportedviews",        "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1420941" ], [ "ObjectModel Pattern Methods",                       50+34,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nn-uiautomationclient-iuiautomationobjectmodelpattern"                                   ], [ "GetUnderlyingObjectModel(ptr*)",                    50+34,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationobjectmodelpattern-getunderlyingobjectmodel"          ], [ "RangeValue Pattern Methods",                        51+34,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationrangevaluepattern"                                    ], [ "SetValue(double)",                                  51+34,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nf-uiautomationclient-iuiautomationrangevaluepattern-setvalue"                           ], [ "CurrentIsReadOnly(long*)",                          51+34,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationrangevaluepattern-get_currentisreadonly"              ], [ "CurrentMaximum(double*)",                           51+34,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationrangevaluepattern-get_currentmaximum"                 ], [ "CurrentMinimum(double*)",                           51+34,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationrangevaluepattern-get_currentminimum"                 ], [ "CurrentLargeChange(double*)",                       51+34,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationrangevaluepattern-get_currentlargechange"             ], [ "CurrentSmallChange(double*)",                       51+34,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationrangevaluepattern-get_currentsmallchange"             ], [ "CurrentValue(double*)",                             51+34,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationrangevaluepattern-get_currentvalue"                   ], [ "Scroll Pattern Methods",                            52+34,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationscrollpattern"                                        ], [ "Scroll($iScrollAmountHorz,$iScrollAmountVert)",     52+34,                   "",       0xCCFFFF, "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nf-uiautomationclient-iuiautomationscrollpattern-scroll",                                "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1420941" ], [ "SetScrollPercent($fPercentHorz,$fPercentVert)",     52+34,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationscrollpattern-setscrollpercent"                       ], [ "CurrentHorizontalScrollPercent($fPercent*)",        52+34,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationscrollpattern-get_currenthorizontalscrollpercent"     ], [ "CurrentVerticalScrollPercent($fPercent*)",          52+34,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationscrollpattern-get_currentverticalscrollpercent"       ], [ "CurrentHorizontalViewSize($fViewSize*)",            52+34,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationscrollpattern-get_currenthorizontalviewsize"          ], [ "CurrentVerticalViewSize($fViewSize*)",              52+34,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationscrollpattern-get_currentverticalviewsize"            ], [ "CurrentHorizontallyScrollable($bScrollable*)",      52+34,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationscrollpattern-get_currenthorizontallyscrollable"      ], [ "CurrentVerticallyScrollable($bScrollable*)",        52+34,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationscrollpattern-get_currentverticallyscrollable"        ], [ "ScrollItem Pattern Methods",                        53+34,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationscrollitempattern"                                    ], [ "ScrollIntoView()",                                  53+34,                   "",       0xCCFFFF, "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nf-uiautomationclient-iuiautomationscrollitempattern-scrollintoview",                    "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1420941" ], [ "Selection Pattern Methods",                         54+34,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationselectionpattern"                                     ], [ "GetCurrentSelection($pElementArray*)",              54+34,                   "",       0xCCFFFF, "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nf-uiautomationclient-iuiautomationselectionpattern-getcurrentselection",                "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1420941" ], [ "CurrentCanSelectMultiple($bCanSelectMultiple*)",    54+34,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationselectionpattern-get_currentcanselectmultiple"        ], [ "CurrentIsSelectionRequired($bIsSelectionRequired*)",54+34,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationselectionpattern-get_currentisselectionrequired"      ], [ "SelectionItem Pattern Methods",                     55+34,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationselectionitempattern"                                 ], [ "Select()",                                          55+34,                   "",       0xCCFFFF, "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nf-uiautomationclient-iuiautomationselectionitempattern-select",                         "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1420941" ], [ "AddToSelection()",                                  55+34,                   "",       0xCCFFFF, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationselectionitempattern-addtoselection",                 "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1420941" ], [ "RemoveFromSelection()",                             55+34,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationselectionitempattern-removefromselection"             ], [ "CurrentIsSelected($bIsSelected*)",                  55+34,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationselectionitempattern-get_currentisselected"           ], [ "CurrentSelectionContainer($pUIElement*)",           55+34,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationselectionitempattern-get_currentselectioncontainer"   ], [ "Selection2 Pattern Methods",                        55+35,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nn-uiautomationclient-iuiautomationselectionpattern2"                                    ], [ "GetCurrentSelection($pElementArray*)",              55+35,                   "",       0xCCFFFF, "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nf-uiautomationclient-iuiautomationselectionpattern-getcurrentselection",                "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1420941" ], [ "CurrentCanSelectMultiple($bCanSelectMultiple*)",    55+35,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationselectionpattern-get_currentcanselectmultiple"        ], [ "CurrentIsSelectionRequired($bIsSelectionRequired*)",55+35,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationselectionpattern-get_currentisselectionrequired"      ], [ "get_CurrentFirstSelectedItem(ptr*)",                55+35,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationselectionpattern2-get_currentfirstselecteditem"       ], [ "get_CurrentLastSelectedItem(ptr*)",                 55+35,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationselectionpattern2-get_currentlastselecteditem"        ], [ "get_CurrentCurrentSelectedItem(ptr*)",              55+35,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationselectionpattern2-get_currentcurrentselecteditem"     ], [ "get_CurrentItemCount(int*)",                        55+35,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationselectionpattern2-get_currentitemcount"               ], [ "Spreadsheet Pattern Methods",                       55+36,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nn-uiautomationclient-iuiautomationspreadsheetpattern"                                   ], [ "GetItemByName(bstr;ptr*)",                          55+36,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationspreadsheetpattern-getitembyname"                     ], [ "SpreadsheetItem Pattern Methods",                   55+37,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nn-uiautomationclient-iuiautomationspreadsheetitempattern"                               ], [ "get_CurrentFormula(bstr*)",                         55+37,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationspreadsheetitempattern-get_currentformula"            ], [ "GetCurrentAnnotationObjects(ptr*)",                 55+37,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationspreadsheetitempattern-getcurrentannotationobjects"   ], [ "GetCurrentAnnotationTypes(ptr*)",                   55+37,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationspreadsheetitempattern-getcurrentannotationtypes"     ], [ "Styles Pattern Methods",                            55+38,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nn-uiautomationclient-iuiautomationstylespattern"                                        ], [ "get_CurrentFillColor(int*)",                        55+38,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationstylespattern-get_currentfillcolor"                   ], [ "get_CurrentFillPatternColor(int*)",                 55+38,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationstylespattern-get_currentfillpatterncolor"            ], [ "get_CurrentFillPatternStyle(bstr*)",                55+38,                   "",       "",       "" ], [ "get_CurrentShape(bstr*)",                           55+38,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationstylespattern-get_currentshape"                       ], [ "get_CurrentStyleId(int*)",                          55+38,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationstylespattern-get_currentstyleid"                     ], [ "get_CurrentStyleName(bstr*)",                       55+38,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationstylespattern-get_currentstylename"                   ], [ "get_CurrentExtendedProperties(bstr*)",              55+38,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationstylespattern-get_currentextendedproperties"          ], [ "SynchronizedInput Pattern Methods",                 56+38,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationsynchronizedinputpattern"                             ], [ "StartListening(long)",                              56+38,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nf-uiautomationclient-iuiautomationsynchronizedinputpattern-startlistening"              ], [ "Cancel()",                                          56+38,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationsynchronizedinputpattern-cancel"                      ], [ "Table Pattern Methods",                             57+38,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationtablepattern"                                         ], [ "GetCurrentRowHeaders($pElementArray*)",             57+38,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nf-uiautomationclient-iuiautomationtablepattern-getcurrentrowheaders"                    ], [ "GetCurrentColumnHeaders($pElementArray*)",          57+38,                   "",       0xCCFFFF, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtablepattern-getcurrentcolumnheaders",                "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1420941" ], [ "CurrentRowOrColumnMajor($iRowOrColumnMajor*)",      57+38,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtablepattern-get_currentroworcolumnmajor"             ], [ "TableItem Pattern Methods",                         58+38,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationtableitempattern"                                     ], [ "GetCurrentRowHeaderItems(ptr*)",                    58+38,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nf-uiautomationclient-iuiautomationtableitempattern-getcurrentrowheaderitems"            ], [ "GetCurrentColumnHeaderItems(ptr*)",                 58+38,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtableitempattern-getcurrentcolumnheaderitems"         ], [ "Text Pattern Methods",                              59+38,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationtextpattern"                                          ], [ "DocumentRange(ptr*)",                               59+38,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nf-uiautomationclient-iuiautomationtextpattern-get_documentrange"                        ], [ "GetSelection(ptr*)",                                59+38,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextpattern-getselection"                             ], [ "GetVisibleRanges(ptr*)",                            59+38,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextpattern-getvisibleranges"                         ], [ "RangeFromChild(ptr,ptr*)",                          59+38,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextpattern-rangefromchild"                           ], [ "RangeFromPoint(struct,ptr*)",                       59+38,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextpattern-rangefrompoint"                           ], [ "SupportedTextSelection(long*)",                     59+38,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextpattern-get_supportedtextselection"               ], [ "Text2 Pattern Methods",                             59+39,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nn-uiautomationclient-iuiautomationtextpattern2"                                         ], [ "DocumentRange(ptr*)",                               59+39,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nf-uiautomationclient-iuiautomationtextpattern-get_documentrange"                        ], [ "GetSelection(ptr*)",                                59+39,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextpattern-getselection"                             ], [ "GetVisibleRanges(ptr*)",                            59+39,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextpattern-getvisibleranges"                         ], [ "RangeFromChild(ptr,ptr*)",                          59+39,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextpattern-rangefromchild"                           ], [ "RangeFromPoint(struct,ptr*)",                       59+39,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextpattern-rangefrompoint"                           ], [ "SupportedTextSelection(long*)",                     59+39,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextpattern-get_supportedtextselection"               ], [ "RangeFromAnnotation(ptr;ptr*)",                     59+39,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextpattern2-rangefromannotation"                     ], [ "GetCaretRange(bool;ptr*)",                          59+39,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextpattern2-getcaretrange"                           ], [ "TextChild Pattern Methods",                         59+40,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nn-uiautomationclient-iuiautomationtextchildpattern"                                     ], [ "get_TextContainer(ptr*)",                           59+40,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextchildpattern-get_textcontainer"                   ], [ "get_TextRange(ptr*)",                               59+40,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtextchildpattern-get_textrange"                       ], [ "TextEdit Pattern Methods",                          59+41,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nn-uiautomationclient-iuiautomationtexteditpattern"                                      ], [ "GetActiveComposition(ptr*)",                        59+41,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtexteditpattern-getactivecomposition"                 ], [ "GetConversionTarget(ptr*)",                         59+41,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtexteditpattern-getconversiontarget"                  ], [ "Toggle Pattern Methods",                            60+41,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationtogglepattern"                                        ], [ "Toggle()",                                          60+41,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nf-uiautomationclient-iuiautomationtogglepattern-toggle"                                 ], [ "CurrentToggleState(long*)",                         60+41,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtogglepattern-get_currenttogglestate"                 ], [ "Transform Pattern Methods",                         61+41,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationtransformpattern"                                     ], [ "Move($fXPos,$fYPos)",                               61+41,                   "",       0xCCFFFF, "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nf-uiautomationclient-iuiautomationtransformpattern-move",                               "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1420941" ], [ "Resize($fWidth,$fHeight)",                          61+41,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtransformpattern-resize"                              ], [ "Rotate($fDegrees)",                                 61+41,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtransformpattern-rotate"                              ], [ "CurrentCanMove($bCanMove*)",                        61+41,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtransformpattern-get_currentcanmove"                  ], [ "CurrentCanResize($bCanResize*)",                    61+41,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtransformpattern-get_currentcanresize"                ], [ "CurrentCanRotate($bCanRotate*)",                    61+41,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtransformpattern-get_currentcanrotate"                ], [ "Transform2 Pattern Methods",                        61+42,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nn-uiautomationclient-iuiautomationtransformpattern2"                                    ], [ "Move($fXPos,$fYPos)",                               61+42,                   "",       0xCCFFFF, "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nf-uiautomationclient-iuiautomationtransformpattern-move",                               "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1420941" ], [ "Resize($fWidth,$fHeight)",                          61+42,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtransformpattern-resize"                              ], [ "Rotate($fDegrees)",                                 61+42,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtransformpattern-rotate"                              ], [ "CurrentCanMove($bCanMove*)",                        61+42,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtransformpattern-get_currentcanmove"                  ], [ "CurrentCanResize($bCanResize*)",                    61+42,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtransformpattern-get_currentcanresize"                ], [ "CurrentCanRotate($bCanRotate*)",                    61+42,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtransformpattern-get_currentcanrotate"                ], [ "Zoom(double)",                                      61+42,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtransformpattern2-zoom"                               ], [ "ZoomByUnit(long)",                                  61+42,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtransformpattern2-zoombyunit"                         ], [ "get_CurrentCanZoom(bool*)",                         61+42,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtransformpattern2-get_currentcanzoom"                 ], [ "get_CurrentZoomLevel(double*)",                     61+42,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtransformpattern2-get_currentzoomlevel"               ], [ "get_CurrentZoomMinimum(double*)",                   61+42,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtransformpattern2-get_currentzoomminimum"             ], [ "get_CurrentZoomMaximum(double*)",                   61+42,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationtransformpattern2-get_currentzoommaximum"             ], [ "Value Pattern Methods",                             62+42,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationvaluepattern"                                         ], [ "SetValue($sValue)",                                 62+42,                   "",       0xCCFFFF, "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nf-uiautomationclient-iuiautomationvaluepattern-setvalue",                               "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1419507" ], [ "CurrentValue($sValue*)",                            62+42,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationvaluepattern-get_currentvalue"                        ], [ "CurrentIsReadOnly($bIsReadOnly*)",                  62+42,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationvaluepattern-get_currentisreadonly"                   ], [ "VirtualizedItem Pattern Methods",                   63+42,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationvirtualizeditempattern"                               ], [ "Realize()",                                         63+42,                   "",       0xCCFFFF, "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nf-uiautomationclient-iuiautomationvirtualizeditempattern-realize",                      "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1421955" ], [ "Window Pattern Methods",                            64+42,                   0xE8E8E8, "",       "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nn-uiautomationclient-iuiautomationwindowpattern"                                        ], [ "Close()",                                           64+42,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/UIAutomationClient/nf-uiautomationclient-iuiautomationwindowpattern-close"                                  ], [ "SetWindowVisualState($iWindowVisualState)",         64+42,                   "",       0xCCFFFF, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationwindowpattern-setwindowvisualstate",                  "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1420941" ], [ "WaitForInputIdle($iMilliSeconds,$bSuccess*)",       64+42,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationwindowpattern-waitforinputidle"                       ], [ "CurrentCanMaximize($bCanMaximize*)",                64+42,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationwindowpattern-get_currentcanmaximize"                 ], [ "CurrentCanMinimize($bCanMinimize*)",                64+42,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationwindowpattern-get_currentcanminimize"                 ], [ "CurrentIsModal($bIsModal*)",                        64+42,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationwindowpattern-get_currentismodal"                     ], [ "CurrentIsTopmost($bIsTopmost*)",                    64+42,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationwindowpattern-get_currentistopmost"                   ], [ "CurrentWindowVisualState($iWindowVisualState*)",    64+42,                   "",       0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationwindowpattern-get_currentwindowvisualstate"           ], [ "CurrentWindowInteractionState($iWindowInteractionState*)",                   64+42,"", 0xE8E8E8, "https://docs.microsoft.com/en-us/windows/desktop/api/uiautomationclient/nf-uiautomationclient-iuiautomationwindowpattern-get_currentwindowinteractionstate"      ], [ "",                                                  ""                       ] ]
Global Const $aElemDetailsArr[490][6] = [ [ "Treeview Element",                                  "",                      0xFFFFE0 ], [ "",                                                  "",                      0x000000 ], [ "Element Properties (identification)",               "",                      0xFFFFE0, "",       "https://docs.microsoft.com/en-us/windows/desktop/winauto/uiauto-automation-element-propids" ], [ "",                                                  "",                      0x000000 ], [ "Element Properties (session unique)",               "",                      0xFFFFE0, "",       "https://docs.microsoft.com/en-us/windows/desktop/winauto/uiauto-automation-element-propids" ], [ "",                                                  "",                      0x000000 ], [ "Element Properties (information)",                  "",                      0xFFFFE0, "",       "https://docs.microsoft.com/en-us/windows/desktop/winauto/uiauto-automation-element-propids" ], [ "",                                                  "",                      0x000000 ], [ "Element Properties (has/is info)",                  "",                      0xFFFFE0, "",       "https://docs.microsoft.com/en-us/windows/desktop/winauto/uiauto-automation-element-propids" ], [ "",                                                  "",                      0x000000 ], [ "Element Properties (default value)",                "",                      0xCCCCFF, "",       "https://docs.microsoft.com/en-us/windows/desktop/winauto/uiauto-automation-element-propids" ], [ "$UIA_AcceleratorKeyPropertyId",                     ""                       ], [ "$UIA_AccessKeyPropertyId",                          ""                       ], [ "$UIA_AnnotationObjectsPropertyId",                  ""                       ], [ "$UIA_AnnotationTypesPropertyId",                    ""                       ], [ "$UIA_AriaPropertiesPropertyId",                     ""                       ], [ "$UIA_AriaRolePropertyId",                           ""                       ], [ "$UIA_AutomationIdPropertyId",                       "",                      0x000000, 0xCCFFFF, "",        "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1419507" ], [ "$UIA_BoundingRectanglePropertyId",                  "",                      0x000000, 0xCCFFFF, "",        "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1419507" ], [ "$UIA_BoundingRectanglePropertyId (scaled)"          ], [ "$UIA_CenterPointPropertyId",                        ""                       ], [ "$UIA_ClassNamePropertyId",                          "",                      0x000000, 0xCCFFFF, "",        "https://www.autoitscript.com/forum/index.php?showtopic=197080&view=findpost&p=1419507" ], [ "$UIA_ClickablePointPropertyId",                     ""                       ], [ "$UIA_ControllerForPropertyId"                       ], [ "$UIA_ControlTypePropertyId",                        ^ ERROR
>Exit code: 1

 

Link to comment
Share on other sites

  • 4 months later...

How to handle popup modal (a Save As window)? The window shows up in UIASpy treeview, but cannot locate it in code. No error, script simply paused -- if closing the window, rest of the code started to execute and reported error as expected (since the window is now gone).

Attempted to open the window in a new process, didn't work.

But if I copy & paste the code that is for the popup window (remove all previous codes except for the initial UIA start code, oDestop, etc.), and run this part of code separately (either via editor's Go button, or run the complied EXE), it works.

Link to comment
Share on other sites

Tried this:

In the main script:

if ($newProcess == 1) Then
        ConsoleWrite("Start a new process" & @CRLF)
        Local $scriptDir = @ScriptDir
        Local $scriptB = $scriptDir & "\script-B.au3"
        Local $exitCodeB = RunWait(@AutoItExe & ' "' & $scriptB & '"', $scriptDir, @SW_SHOW)
        if @error Then
            ConsoleWrite("Run script B error " & @CRLF)
        EndIf
        ;RunWait("C:\Users\admin\Desktop\share\script-B.exe")
        ConsoleWrite("exit code is " & $exitCodeB & @CRLF)

In the 2nd script:

sleep(5000)
ConsoleWrite( "Entering script B" & @CRLF )
Opt( "MustDeclareVars", 1 )

Global $saveAsTitle, $saveAsHandle
$saveAsTitle = "Save As"
; Check if the window is already open
$saveAsHandle = WinGetHandle($saveAsTitle)
; Bring the window to the front
WinActivate($saveAsHandle)

Example()
Func Example()

When running, console first outputs this:

Before oButton Click
Before DoDefaultAction
Start a new process
exit code is 0

and then the program paused at Save As window, after a while (more than 1 minute), it exited. No error. Script B didn't execute either. Rest of the console output is

After DoDefaultAction
After oButton Click
+>08:50:31 AutoIt3.exe ended.rc:0
+>08:50:31 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 83.15

Made a test in the main script:

;Local $exitCodeB = RunWait(@AutoItExe & ' "' & $scriptB & '"', $scriptDir, @SW_SHOW)
        Local $exitCodeB = RunWait("notepad.exe")

Notice that notepad shows up first, and the Save As window didn't show up until I close the notepad window --- this is interesting! So, I changed RunWait to Run, and it works now 🙂

Edited by myu8171
Link to comment
Share on other sites

  • 2 months later...
15 hours ago, bar5h said:

I'm trying to automate Telegram Desktop.
But how do I handle multiple open Telegram.exe applications?

For some reason the code only works for one Telegram.

14 hours ago, argumentum said:

..yes, that code, ...that code need to change for multiple widows.

5 hours ago, bar5h said:

Could you please give some examples? Or maybe a place in the documentation?

..are we talking about the same code ? Show me yours.

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

On 9/6/2024 at 7:33 PM, argumentum said:

..are we talking about the same code ? Show me yours.

It seems I have almost solved the problem.

 

My task was the following:

1. Open the link to the bot in {N} TelegramDesktop.

2. Press the button to open the mini-application in the bot.

As a result, mini-applications should be opened in all TelegramDesktops.

 

The first thing I had problems with include. The variables $dtagIUIAutomationElement and $dtagIUIAutomationElementArray were not in these files:

#include "Includes\UIA_Constants.au3"
#include "Includes\UIA_Functions.au3"

I moved them to a separate file UIA_Globals.au3 from the file Includes\CUIAutomation2.au3

 

How I accomplished the task:

1. I found all the windows using the FindAll command.

2. Then sorted them by $UIA_ClassNamePropertyId = "TWidget"

3. Each TelegramDesktop became the active window, where we went through all available elements (39 elements). It was determined empirically that the element with ID = 25 is a button for opening a mini-application.

4. I click this button using UIA_MouseClick, since Invoke does not work, and clicking on the rectangle can have errors when changing the size of the TelegramDesktop window.

 

Unfortunately, if the folder function is not activated in TelegramDesktop, then the number of elements becomes smaller, so the script is executed incorrectly and clicks on the wrong button. Perhaps it is worth comparing the number of elements. It would be nice if we could get the internal value of the text on the button, but I'm not sure if this is possible.

 

Code:

UIA_Globals.au3

Spoiler
#include-once

Global $dtagIUIAutomationElement = "SetFocus hresult();" & _
"GetRuntimeId hresult(ptr*);" & _
"FindFirst hresult(long;ptr;ptr*);" & _
"FindAll hresult(long;ptr;ptr*);" & _
"FindFirstBuildCache hresult(long;ptr;ptr;ptr*);" & _
"FindAllBuildCache hresult(long;ptr;ptr;ptr*);" & _
"BuildUpdatedCache hresult(ptr;ptr*);" & _
"GetCurrentPropertyValue hresult(int;variant*);" & _
"GetCurrentPropertyValueEx hresult(int;long;variant*);" & _
"GetCachedPropertyValue hresult(int;variant*);" & _
"GetCachedPropertyValueEx hresult(int;long;variant*);" & _
"GetCurrentPatternAs hresult(int;none;none*);" & _
"GetCachedPatternAs hresult(int;none;none*);" & _
"GetCurrentPattern hresult(int;ptr*);" & _
"GetCachedPattern hresult(int;ptr*);" & _
"GetCachedParent hresult(ptr*);" & _
"GetCachedChildren hresult(ptr*);" & _
"CurrentProcessId hresult(int*);" & _
"CurrentControlType hresult(int*);" & _
"CurrentLocalizedControlType hresult(bstr*);" & _
"CurrentName hresult(bstr*);" & _
"CurrentAcceleratorKey hresult(bstr*);" & _
"CurrentAccessKey hresult(bstr*);" & _
"CurrentHasKeyboardFocus hresult(long*);" & _
"CurrentIsKeyboardFocusable hresult(long*);" & _
"CurrentIsEnabled hresult(long*);" & _
"CurrentAutomationId hresult(bstr*);" & _
"CurrentClassName hresult(bstr*);" & _
"CurrentHelpText hresult(bstr*);" & _
"CurrentCulture hresult(int*);" & _
"CurrentIsControlElement hresult(long*);" & _
"CurrentIsContentElement hresult(long*);" & _
"CurrentIsPassword hresult(long*);" & _
"CurrentNativeWindowHandle hresult(hwnd*);" & _
"CurrentItemType hresult(bstr*);" & _
"CurrentIsOffscreen hresult(long*);" & _
"CurrentOrientation hresult(long*);" & _
"CurrentFrameworkId hresult(bstr*);" & _
"CurrentIsRequiredForForm hresult(long*);" & _
"CurrentItemStatus hresult(bstr*);" & _
"CurrentBoundingRectangle hresult(struct*);" & _
"CurrentLabeledBy hresult(ptr*);" & _
"CurrentAriaRole hresult(bstr*);" & _
"CurrentAriaProperties hresult(bstr*);" & _
"CurrentIsDataValidForForm hresult(long*);" & _
"CurrentControllerFor hresult(ptr*);" & _
"CurrentDescribedBy hresult(ptr*);" & _
"CurrentFlowsTo hresult(ptr*);" & _
"CurrentProviderDescription hresult(bstr*);" & _
"CachedProcessId hresult(int*);" & _
"CachedControlType hresult(int*);" & _
"CachedLocalizedControlType hresult(bstr*);" & _
"CachedName hresult(bstr*);" & _
"CachedAcceleratorKey hresult(bstr*);" & _
"CachedAccessKey hresult(bstr*);" & _
"CachedHasKeyboardFocus hresult(long*);" & _
"CachedIsKeyboardFocusable hresult(long*);" & _
"CachedIsEnabled hresult(long*);" & _
"CachedAutomationId hresult(bstr*);" & _
"CachedClassName hresult(bstr*);" & _
"CachedHelpText hresult(bstr*);" & _
"CachedCulture hresult(int*);" & _
"CachedIsControlElement hresult(long*);" & _
"CachedIsContentElement hresult(long*);" & _
"CachedIsPassword hresult(long*);" & _
"CachedNativeWindowHandle hresult(hwnd*);" & _
"CachedItemType hresult(bstr*);" & _
"CachedIsOffscreen hresult(long*);" & _
"CachedOrientation hresult(long*);" & _
"CachedFrameworkId hresult(bstr*);" & _
"CachedIsRequiredForForm hresult(long*);" & _
"CachedItemStatus hresult(bstr*);" & _
"CachedBoundingRectangle hresult(struct*);" & _
"CachedLabeledBy hresult(ptr*);" & _
"CachedAriaRole hresult(bstr*);" & _
"CachedAriaProperties hresult(bstr*);" & _
"CachedIsDataValidForForm hresult(long*);" & _
"CachedControllerFor hresult(ptr*);" & _
"CachedDescribedBy hresult(ptr*);" & _
"CachedFlowsTo hresult(ptr*);" & _
"CachedProviderDescription hresult(bstr*);" & _
"GetClickablePoint hresult(struct*;long*);"

Global $dtagIUIAutomationElementArray = "Length hresult(int*);" & _
"GetElement hresult(int;ptr*);"

Example.au3

Spoiler
#include "UIA_Globals.au3"
#include "Includes\UIA_Constants.au3"
#include "Includes\UIA_Functions.au3"


Opt( "MustDeclareVars", 1 )

Example()

Func Example()
  
  ; Create UI Automation object
  Local $oUIAutomation = ObjCreateInterface( $sCLSID_CUIAutomation, $sIID_IUIAutomation, $dtag_IUIAutomation )
  If Not IsObj( $oUIAutomation ) Then Return ConsoleWrite( "$oUIAutomation ERR" & @CRLF )
  ConsoleWrite( "$oUIAutomation OK" & @CRLF )

  ; Get Desktop element
  Local $pDesktop, $oDesktop
  $oUIAutomation.GetRootElement( $pDesktop )
  $oDesktop = ObjCreateInterface( $pDesktop, $sIID_IUIAutomationElement, $dtag_IUIAutomationElement )
  If Not IsObj( $oDesktop ) Then Return ConsoleWrite( "$oDesktop ERR" & @CRLF )
  ConsoleWrite( "$oDesktop OK" & @CRLF )

  ; --- Code Snippets ---

  ConsoleWrite( "--- Code Snippets ---" & @CRLF )

  ; --- Or condition to find window/control ---

  ConsoleWrite( "--- Or condition to find window/control ---" & @CRLF )

  Local $pCondition0, $pCondition1, $pOrCondition1
  $oUIAutomation.CreatePropertyCondition( $UIA_ControlTypePropertyId, $UIA_WindowControlTypeId, $pCondition0 )
  $oUIAutomation.CreatePropertyCondition( $UIA_ControlTypePropertyId, $UIA_PaneControlTypeId, $pCondition1 )
  $oUIAutomation.CreateOrCondition( $pCondition0, $pCondition1, $pOrCondition1 )
  If Not $pOrCondition1 Then Return ConsoleWrite( "$pOrCondition1 ERR" & @CRLF )
  ConsoleWrite( "$pOrCondition1 OK" & @CRLF )

  ; --- $oUIElement methods ---

  ConsoleWrite( "--- $oUIElement methods ---" & @CRLF )

  Local $pElements
  $oDesktop.FindAll( $TreeScope_Children, $pCondition0, $pElements )  ; Windows only
  ;$oDesktop.FindAll( $TreeScope_Children, $pOrCondition1, $pElements ) ; Windows and Panes
  ConsoleWrite( "$oDesktop.FindAll()" & @CRLF )

  ; --- Code Snippets ---

  ConsoleWrite( "--- Code Snippets ---" & @CRLF )

  Local $oUIElementArray1, $iLength1 ; $pElements is a pointer to an UI Automation element array
  $oUIElementArray1 = ObjCreateInterFace( $pElements, $sIID_IUIAutomationElementArray, $dtag_IUIAutomationElementArray )
  $oUIElementArray1.Length( $iLength1 )
  If Not $iLength1 Then Return ConsoleWrite( "$iLength1 = 0 ERR" & @CRLF )
  ConsoleWrite( "$iLength1 = " & $iLength1 & @CRLF )

  ; --- Code Snippets ---

  ConsoleWrite( "--- Code Snippets ---" & @CRLF )

  Local $pElement1, $oElement1
  Local $sClassName1, $sLocalizedControlType1, $sName1, $hNativeWindowHandle1
  For $i = 0 To $iLength1 - 1
    $oUIElementArray1.GetElement( $i, $pElement1 )
    $oElement1 = ObjCreateInterface( $pElement1, $sIID_IUIAutomationElement, $dtag_IUIAutomationElement )
    $oElement1.GetCurrentPropertyValue( $UIA_ClassNamePropertyId, $sClassName1 )
    Switch $sClassName1
      Case "Progman", "Shell_TrayWnd"
        ContinueLoop
    EndSwitch

    If ($sClassName1 == "TWidget") Then

      ConsoleWrite( "--- Telegram window ---" & @CRLF )
    
      UIA_WinActivate( $oElement1 )
      ConsoleWrite( "UIA_WinActivate( $oElement1 )" & @CRLF )

      ; --- Find window/control ---
    
      ConsoleWrite( "--- Find window/control ---" & @CRLF )
    
      Local $pCondition0
      $oUIAutomation.CreatePropertyCondition( $UIA_ControlTypePropertyId, $UIA_GroupControlTypeId, $pCondition0 )
      If Not $pCondition0 Then Return ConsoleWrite( "$pCondition0 ERR" & @CRLF )
      ConsoleWrite( "$pCondition0 OK" & @CRLF )
    
      Local $pFile, $oFile
      $oElement1.FindAll( $TreeScope_Descendants, $pCondition0, $pFile )

      Local $oUIElementArray2, $iLength2 ; $pElements is a pointer to an UI Automation element array
      $oUIElementArray2 = ObjCreateInterface($pFile, $sIID_IUIAutomationElementArray, $dtagIUIAutomationElementArray)
      If Not IsObj($oUIElementArray2) Then Return ConsoleWrite(':' & @ScriptLineNumber & ':' & " $oUIElementArray2 ERR" & @CRLF)
      ConsoleWrite(':' & @ScriptLineNumber & ':' & " $oUIElementArray2 OK" & @CRLF)

    ; script stops here - apparently array is not created
      $oUIElementArray2.Length($iLength2)
      If Not $iLength2 Then Return ConsoleWrite(':' & @ScriptLineNumber & ':' & " $iLength2 = 0 ERR" & @CRLF)
      ConsoleWrite(':' & @ScriptLineNumber & ':' & " $iLength2 = " & $iLength2 & @CRLF)

    #cs=============================================================================
    Display array
    #ce=============================================================================
    Local $pElement2, $oElement2, $sValue2
    For $j = 0 To $iLength2 - 1
        $oUIElementArray2.GetElement($j, $pElement2)
        $oElement2 = ObjCreateInterface($pElement2, $sIID_IUIAutomationElement, $dtagIUIAutomationElement)
        $oElement2.GetCurrentPropertyValue($UIA_NamePropertyId, $sValue2)

        If ($j == 25) Then
          UIA_MouseClick ($oElement2)
          ConsoleWrite("Click!" & @CRLF)
          ContinueLoop
        EndIf
        
    Next
    
    ConsoleWrite( @CRLF & "$sClassName1 = " & $sClassName1 & @CRLF )
    $oElement1.GetCurrentPropertyValue( $UIA_LocalizedControlTypePropertyId, $sLocalizedControlType1 )
    ConsoleWrite( "$sLocalizedControlType1 = " & $sLocalizedControlType1 & @CRLF )
    $oElement1.GetCurrentPropertyValue( $UIA_NamePropertyId, $sName1 )
    ConsoleWrite( "$sName1 = " & $sName1 & @CRLF )
    $oElement1.GetCurrentPropertyValue( $UIA_NativeWindowHandlePropertyId, $hNativeWindowHandle1 )
    ConsoleWrite( "$hNativeWindowHandle1 = " & HWnd( $hNativeWindowHandle1 ) & @CRLF )

    EndIf

    Sleep(1000)

  Next

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