How to manually clear highlight box *after* execution?

Oct 6, 2013 at 6:12 AM
I think the highlight box is useful in debug process.
But after execution, the box remains there, which is annoying.
Is there any way to turn it off, manually (just one time) by a command?
Oct 6, 2013 at 6:19 AM
At any time, you could use these setting
Many cmdlets have the -Highlight parameter (though I'm not sure that it still works):
Get-UIAButton -Name aaaa -Highlight:$false
In practice, highlighting is useful. A typical situation that test found a control, highlighted it, searches for the next control (it's gone for some reason), test fails and saves the screenshot of the full screen with the last successful control bordered.
Oct 6, 2013 at 6:57 AM
I mean after debugging, the boxes still lies there, I can't drive it away, can I?
For example:
[UIAutomation.Preferences]::Highlight = $true
[UIAutomation.Preferences]::HighlightParent = $true

# test code...

[UIAutomation.Preferences]::Highlight = $false
[UIAutomation.Preferences]::HighlightParent = $false
After execution, the boxes still there. Will there be a Cmdlet like
That become effect immediately?
Oct 6, 2013 at 7:12 AM
the Hide-UIACurrentHighlighter cmdlet

Use the following construct to express your wishes :)
Get-Command *your wish*
for example
Get-Command *highlight*
Marked as answer by VictorWoo on 10/6/2013 at 12:28 AM
Oct 6, 2013 at 7:28 AM
Yes, bingo, thanks!
Oct 6, 2013 at 9:26 AM
After practicing it a while, I think Clear-UIAHighlight is not convenient, though, specially in PowerShell command line. It needs manual intervention every time.
If it can be turned off automatically after execution in 30 sec, it must awesome, not disturbing.