The Descendants property returns all control of the selected type down the hierarchy:
$wnd = Start-Process calc -PassThru | Get-UiaWindow
The oupput type is collection, so that to get a single control or several controls we need to feed the expression with numeric values:
or a fragment of their Name, AutomationId or ClassName properties
# only numeric button
# through their AutomationIds
$wnd.Descendants.Buttons['13*'] | Read-UiaControlName

Last edited Feb 10, 2014 at 12:52 PM by apetrovskiy, version 1


No comments yet.