CodePlex - Windows Automation Snapin for PowerShell
WASP is a PowerShell snapin for Windows Automation tasks like selecting windows and controls and sending mouse and keyboard events. We have automation cmdlets like Select-Window, Select-Control, Send-Keys, Send-Click, Get-WindowPosition, Set-WindowPosition, Set-WindowActive, Remove-Window ... etc.
Our goal is to enable you to accomplish most Windows GUI Automation scripting from inside PowerShell, without resorting to specialized (and expensive) scripting tools.
Just to be clear, don't expect any "click to record" functionality ... but do expect to be able to automatically tile windows, send mouse clicks and keystrokes, and in general, automate those tasks that you would normally not be able to do from a console." [Project description leached in full]
Windows Automation Snapin for PowerShell - automation cmdlets
- Select-Window - pick windows by process name or window caption (with wildcard support)
- Select-Control - pick controls by class and/or name and/or index (with wildcard support)
- Send-Click - send mouse clicks (any button, with any modifier keys)
- Send-Keys - Windows.Forms.SendKeys lets you send keys ... try this: Select-Window notepad | Send-Keys "%(ea)Testing{Enter}{F5}" (and for extra fun, try it with multiple notepad windows open).
- Set-WindowActive - yeah, just activates the window
- Set-WindowPosition - set any one of (or all of) top, left, width, height on a window ... or maximize/minimize/restore
- Get-WindowPosition - get the position (kind-of redundant, actually, since the Window object has it's position as a property)
- Remove-Window - closes the specified window
[Wikipage leached in full]
That's kind of an interesting project and I can see this being useful...
No comments:
Post a Comment
NOTE: Anonymous Commenting has been turned off for a while... The comment spammers are just killing me...
ALL comments are moderated. I will review every comment before it will appear on the blog.
Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...
I reserve, and will use, the right to not approve ANY comment for ANY reason. I will not usually, but if it's off topic, spam (or even close to spam-like), inflammatory, mean, etc, etc, well... then...
Please see my comment policy for more information if you are interested.
Thanks,
Greg
PS. I am proactively moderating comments. Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...