#include "UIAutomate.au3"
#include <Array.au3>
#include <IE.au3>
$oIE = _IECreate("http://cartechnic.ru/asia/asia_rocsta__18_5mt_3dr_combi")
MsgBox(0, "Info", GetInfo("Тип кузова"))
MsgBox(0, "Info", GetInfo("Мощность"))
_ArrayDisplay(GetFullInfo("Кузов"))
_ArrayDisplay(GetFullInfo("Трансмиссия"))
_ArrayDisplay(GetFullInfo("Эксплуатационные показатели"))
_IEQuit($oIE)
Func GetInfo($About)
Local $oParent = _UIA_GetElementFromHandle(ControlGetHandle("[class:IEFrame]", "", "Internet Explorer_Server1"))
Local $oStart = _UIA_GetControlTypeElement($oParent, "UIA_ListItemControlTypeId", $About)
Local $aPN = _UIA_ElementGetPreviousNext($oStart)
If @error Or Not IsObj($aPN[1]) Then
Return $About & " : не найдено"
Else
Return $About & " : " & _UIA_ElementGetPropertyValue($aPN[1], "Name")
EndIf
EndFunc
Func GetFullInfo($About)
Local $oParent = _UIA_GetElementFromHandle(ControlGetHandle("[class:IEFrame]", "", "Internet Explorer_Server1"))
Local $oStart = _UIA_GetControlTypeElement($oParent, "UIA_TextControlTypeId", $About)
Local $aPN = _UIA_ElementGetPreviousNext($oStart)
If @error Or Not IsObj($aPN[1]) Then Return
Local $aItems = _UIA_FindAllElements($aPN[1], "ControlType", $UIA_ListItemControlTypeId)
If @error Then Return
Local $aInfo[$aItems[0] / 2][2], $j = 0
For $i = 1 To $aItems[0] Step 2
$aInfo[$j][0] = _UIA_ElementGetPropertyValue($aItems[$i], "Name")
$aInfo[$j][1] = _UIA_ElementGetPropertyValue($aItems[$i + 1], "Name")
$j += 1
Next
Return $aInfo
EndFunc