JSONTree = session.GetObjectTree("wnd[0]")
Set FSO = CreateObject("Scripting.FileSystemObject")
Set oFile = FSO.CreateTextFile("Test.json",True)
oFile.Write JSONTree
oFile.Close
arrayOfProps = Array("Id", "Text", "Type", "Name", _
"ScreenLeft", "ScreenTop", "Left", "Top", "Height", "Width", _
"Handle", "ToolTip", "DefaultToolTip", "IconName", _
"Changeable", "ContainerType")
JSONTree = session.GetObjectTree("wnd[0]", arrayOfProps)
Set FSO = CreateObject("Scripting.FileSystemObject")
Set oFile = FSO.CreateTextFile("Test.json", True)
oFile.Write JSONTree
oFile.Close

$arrayOfProps = @("Id", "Text", "Type", "IconName", "Tooltip");
$JSONTree = Invoke-Method -object $session -methodName "GetObjectTree" -methodParameter @("wnd[0]", $arrayOfProps);
$AllElements = ConvertFrom-Json $JSONTree;
$Elements = $AllElements.children.children
ForEach($Element in $Elements) {
$Element.properties.Id;
}You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 30 | |
| 21 | |
| 19 | |
| 16 | |
| 15 | |
| 13 | |
| 12 | |
| 11 | |
| 11 | |
| 10 |