1 # Powershell script to dump accessibility tree for Chromium. Takes optional first argument with part of window title to disambiguate the desired window. 2 $all = ps | where {$_.ProcessName -eq 'chrome'} |where MainWindowTitle -like "*$($args[0])*Google Chrome" | select MainWindowHandle, MainWindowTitle 3 echo $all 4 echo "" 5 If (@($all).length -gt 1) { 6 echo "Multiple matching windows, please disambuate: include part of the desired window's title as a first argument." 7 exit 8 } 9 10 $hwnd = Get-Process | where {$_.ProcessName -eq 'chrome'} | where MainWindowTitle -like "*$($args[0])*Chromium*" | select MainWindowHandle -ExpandProperty MainWindowHandle | Out-String 11 $hwnd_arg = "--window=" + $hwnd 12 $exe = ".\ax_dump_tree.exe" 13 & $exe $hwnd_arg