Let's you do UI automation in PowerShell. This example starts calc.exe and clicks buttons 1, 2, 3:
Start-Process calc -PassThru | Get-UIAWindow | Get-UIAButton -Name [1-3] | Invoke-UIAButtonClick;Let's you do UI automation in PowerShell. This example starts calc.exe and clicks buttons 1, 2, 3:
Start-Process calc -PassThru | Get-UIAWindow | Get-UIAButton -Name [1-3] | Invoke-UIAButtonClick;If a JavaScript runtime like nodejs had access to the same interfaces as PowerShell or to COM I'd be over the moon.
It would be very powerful, you'd effectively be opening up windows shell programming (OS scripting) to tens of millions of developers rather than the 1% that take the time to learn PowerShell.
I've actually experienced this first hand. There's a small but prolific community on OSX who do this for Window Management and Automation; see https://github.com/jasonm23/phoenix and http://hammerspoon.org
They're great to work with, and it's easy to build your own abstractions on top since they actually have a real language that you can work with. Imagine this for instance:
Windows.find(window => window.title == "Sublime Text")
.moveTo(Screen.find(screen => screen.name.contains("Dell"))
It's so bizarre to me this isn't a thing in Windows. It's a super good thing to have.