UIAutomation 0.6.7

Rating: No reviews yet
Downloads: 17
Released: Mar 5, 2012
Updated: Mar 5, 2012 by xinliu
Dev status: Beta Help Icon

Recommended Download

Application UIAutomation 0.6.7 alpha
application, 76K, uploaded Mar 5, 2012 - 11 downloads

Other Available Downloads

Application UIAutomation 0.6.7 sources
application, 2303K, uploaded Mar 5, 2012 - 6 downloads

Release Notes

The most of changes were produced is a bug fix.

In addition, several new parameters are introduced here:
Get-UIAWindow -pn mmc # the old good -ProcessName or -pn
Get-UIAWindow -pid (Get-Process -Name mmc).Id # -ProcessId or -pid
Get-UIAWindow -p (Get-Process -Name mmc) # -Process or -p
Start-Process calc -PassThru | Get-UIAWindow # System.Diagnostics.Process via Pipeline

This means that instead of using three statements:
Start-Process C:\Windows\system32\mmc.exe
sleep -seconds 5
Get-UIAWindow -pn mmc

we can use the following one-liner:
Start-Process C:\Windows\System32\mmc.exe -PassThru | Get-UIAWindow -Seconds 5
(in case that no mmc window is available after five seconds are gone, the sample above throws an exception. Otherwise, it gets the window when it is available).

Also, one more cmdlet to get a window or a control:
(Get-Process -Name mmc)0.MainWindowHandle | Get-UIAControlFromHandle
Get-UIAWindow -pn mmc | Read-UIAControlNativeWindowHandle | Get-UIAControlFromHandle
or almost the same:
$hwnd = (Get-UIAWindow -pn mmc | Read-UIAControlNativeWindowHandle); Get-UIAControlFromHandle -Handle $hwnd
or a control by handle:
$h = Get-UIAWindow -pn mmc | Read-UIAControlNativeWindowHandle;
Get-UIAControlFromHandle -Handle $h | Get-UIAButton -Name Cancel | Invoke-UIAButtonClick;

Reviews for this release

No reviews yet for this release.