<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Provide Input to Applications with PowerShell</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2011/01/10/provide-input-to-applications-with-powershell.aspx</link><description>Summary: Use SendKeys to provide input to graphical applications with Windows PowerShell. 
 
 Hey, Scripting Guy! I am almost embarrassed to admit this but you know what I miss most about VBScript? I miss the SendKeys function. I do not know why Windows</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Provide Input to Applications with PowerShell</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2011/01/10/provide-input-to-applications-with-powershell.aspx#3486375</link><pubDate>Tue, 13 Mar 2012 12:46:53 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3486375</guid><dc:creator>Alexander</dc:creator><description>&lt;p&gt;Okay, Ed, you are right, since no modules hide the lost SendKeys the admin asked for.&lt;/p&gt;
&lt;p&gt;Worse, modules often require itself to be downloaded and installed.&lt;/p&gt;
&lt;p&gt;However, things are not so bad as if the original UI Automation library from MS is used. Now, the Application Input code looks like (more lines of code, than in yours):&lt;/p&gt;
&lt;p&gt;ipmo .....\UIAutomation.dll&lt;/p&gt;
&lt;p&gt;Start-Process calc -PassThru | Get-UIAWindow | Get-UIAButton -Name 1 | Invoke-UIAButtonClick;&lt;/p&gt;
&lt;p&gt;Get-UIAButton -Name Add | Invoke-UIAButtonClick;&lt;/p&gt;
&lt;p&gt;Get-UIAButton -Name 1 | Invoke-UIAButtonClick;&lt;/p&gt;
&lt;p&gt;Get-UIAButton -Name Equals | Invoke-UIAButtonClick;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3486375" width="1" height="1"&gt;</description></item><item><title>re: Provide Input to Applications with PowerShell</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2011/01/10/provide-input-to-applications-with-powershell.aspx#3481226</link><pubDate>Wed, 15 Feb 2012 20:54:41 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3481226</guid><dc:creator>Ed Wilson</dc:creator><description>&lt;p&gt;@Alexander I respectfully disagree. First of all, the question was from a person who stated that he missed SendKeys, and wanted to know if there was a way to do that in Powershell ... there is. Second of all SendKeys, while sometimes dangerous, and often klugey, is extremely easy to use. In a controlled setting, there is nothing wrong with using it at all. The UIAutomation Library is very complex, and is not aimed at network administrators ... it is aimed at software testers. It certainly would be a good thing to learn, but is way beyond the scope for a person who simply needs to click the next button for some software without an automation install interface. In addition, all of the other projects (wasp on Codeplex and the UI Automation Module on PoshCode are the same project by the way) are not completed, and are more on the line of proof of concept. I appreciate your comments and suggestions for additional means of automating applications. &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3481226" width="1" height="1"&gt;</description></item><item><title>re: Provide Input to Applications with PowerShell</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2011/01/10/provide-input-to-applications-with-powershell.aspx#3481220</link><pubDate>Wed, 15 Feb 2012 20:17:06 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3481220</guid><dc:creator>Alexander</dc:creator><description>&lt;p&gt;Hi, the SendKeys method (that is habitual in VB, .NET and a range of scripting technologies) is now superseded by a bunch of tools based on UIAutomaiton library: the library itself, UIAutomation PowerShell module (seen at PoshCode), UIAtomation and WASP cmdlets (at codeplex), white (also at CodePlex).&lt;/p&gt;
&lt;p&gt;Sending keys is a very unreliable way to control the app, losing focus or even simply losing processor ticks on a highly loaded host may lead to losing or repeating characters if you put them into a text box...&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3481220" width="1" height="1"&gt;</description></item></channel></rss>