<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Huddled Masses - Latest Comments in Window GUI Automation from PowerShell</title><link>http://huddledmasses.disqus.com/</link><description>Joel Bennett's development blog...</description><language>en</language><lastBuildDate>Sat, 11 Oct 2008 21:49:10 -0000</lastBuildDate><item><title>Re: Window GUI Automation from PowerShell</title><link>http://HuddledMasses.org/window-gui-automation-from-powershell/#comment-3003080</link><description>Yeah, that should be possible. If it's modal, it should be the "active" window anyway, so you should be able to get it that way, or just send-keys and have them go to it by default...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jaykul</dc:creator><pubDate>Sat, 11 Oct 2008 21:49:10 -0000</pubDate></item><item><title>Re: Window GUI Automation from PowerShell</title><link>http://HuddledMasses.org/window-gui-automation-from-powershell/#comment-3002283</link><description>Hi Jaykul,&lt;br&gt;My app that I'm trying to automate pops up a modal dialog when I click a key. However, I can't find any way to select that modal dialog - should this be possible?&lt;br&gt;&lt;br&gt;Thanks,&lt;br&gt;seaJhawk</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">seaJhawk</dc:creator><pubDate>Sat, 11 Oct 2008 19:40:02 -0000</pubDate></item><item><title>Re: Window GUI Automation from PowerShell</title><link>http://HuddledMasses.org/window-gui-automation-from-powershell/#comment-2587435</link><description>For CTP2, you need to *either* put the dll into a specific folder ... @Documents\WindowsPowerShell\Packages\WindowsAutomation\WindowsAutomation.dll@ in which case you'll be able to call just:&lt;br&gt;&lt;br&gt;Add-Module WindowsAutomation&lt;br&gt;&lt;br&gt;Otherwise, you can load it by specifying the path to the actual .dll:&lt;br&gt;&lt;br&gt;Add-Module .\WindowsAutomation.dll</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jaykul</dc:creator><pubDate>Thu, 18 Sep 2008 08:28:04 -0000</pubDate></item><item><title>Re: Window GUI Automation from PowerShell</title><link>http://HuddledMasses.org/window-gui-automation-from-powershell/#comment-2587434</link><description>hi,&lt;br&gt;&lt;br&gt; If I do Add-module I am getting this error.&lt;br&gt;&lt;br&gt; F:\windowautomation&amp;gt; &lt;br&gt;Add-Module .\WindowAutomation&lt;br&gt;Add-Module : The specified module '.\WindowAutomation' was not loaded because the module source file was not found in any package &lt;br&gt;directory, &lt;br&gt;At line:1 char:11&lt;br&gt;+ Add-Module &amp;lt;&amp;lt;&amp;lt;&amp;lt;  .\WindowAutomation</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rama</dc:creator><pubDate>Thu, 18 Sep 2008 07:05:00 -0000</pubDate></item><item><title>Re: Window GUI Automation from PowerShell</title><link>http://HuddledMasses.org/window-gui-automation-from-powershell/#comment-2587433</link><description>Hi, &lt;br&gt; &lt;br&gt; I am using CTP2 only can you please guide me how can I install &lt;br&gt;&lt;br&gt;bacaz Installutil is  not recognised  as a cmdlet. It will be helpful for me  how to  install the  GUI Automation Snapin from the scrach.&lt;br&gt;&lt;br&gt;Do I need any other .exe  to proceed the installation. The snapin which is not working out for me.&lt;br&gt;&lt;br&gt;thanks in advance</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rama</dc:creator><pubDate>Thu, 18 Sep 2008 07:00:44 -0000</pubDate></item><item><title>Re: Window GUI Automation from PowerShell</title><link>http://HuddledMasses.org/window-gui-automation-from-powershell/#comment-2587432</link><description>You need to run "Get-Help about_signing" as it suggests.  By default PowerShell requires everything to be cryptographically signed.  My stuff isn't, so you have to use the "Set-ExecutionPolicy" cmdlet to set your policy to "RemoteSigned"... and you might have to "unblock" the script (this is all described in the "Get-Help about_signing" document.&lt;br&gt;&lt;br&gt;If you're using CTP2, you can use Add-Module instead of using the installer.&lt;br&gt;&lt;br&gt;Also, you should use the version on "CodePlex":http://CodePlex.com/WASP because it's been updated from the one I posted. I've changed that in the article.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jaykul</dc:creator><pubDate>Wed, 17 Sep 2008 23:26:32 -0000</pubDate></item><item><title>Re: Window GUI Automation from PowerShell</title><link>http://HuddledMasses.org/window-gui-automation-from-powershell/#comment-2587431</link><description>Hi,&lt;br&gt;&lt;br&gt;   How can I install the windows automation snapin in my power shell environment. I am getting an error like &lt;br&gt;&lt;br&gt;File C:\Documents and settings\test\Desktop\windowautomation\WindowAutomation\Install.ps1 cannot be loaded. The file C:\Documents and Settings\test\Desktop\windowautomation\WindowAutomation\Install.ps1 is not digitally signed. The script will not execute on the system. Please see "get-help about_signing" for more details..&lt;br&gt;At line:0 char:0</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">rama</dc:creator><pubDate>Wed, 17 Sep 2008 01:36:58 -0000</pubDate></item><item><title>Re: Window GUI Automation from PowerShell</title><link>http://HuddledMasses.org/window-gui-automation-from-powershell/#comment-2587429</link><description>Hm, looks like I messed up the parameter sets somehow. I'll have to push out a new release on CodePlex.&lt;br&gt;&lt;br&gt;Select-Window doesn't seem to like selecting the console windows ... and I don't know why (that is to say, I'll have to crack the code open, so gimme a few days). They show up if you do @Select-Window | ? {$_.ProcessName -eq "powershell"}@ ...&lt;br&gt;&lt;br&gt;Get-WindowPosition and Remove-Window are broken because I messed up their parameter sets -- they can't resolve which parameter set to use, because they have two sets which are basically identical. That was a typo on my part.  Luckily, you can use the @Position@ attribute on the Window objects, and the CloseMainWindow() and CloseProcess() methods...&lt;br&gt;&lt;br&gt;Send-Keys seems to work fine here ... either via the pipeline or as an argument:&lt;br&gt;&lt;br&gt;&lt;code lang="posh"&gt;&lt;br&gt;$np = Select-Window notepad&lt;br&gt;Send-Keys $np "what?"&lt;br&gt;Select-Window notepad | Send-Keys "%{f4}n"&lt;/code&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jaykul</dc:creator><pubDate>Wed, 21 May 2008 13:30:12 -0000</pubDate></item><item><title>Re: Window GUI Automation from PowerShell</title><link>http://HuddledMasses.org/window-gui-automation-from-powershell/#comment-2587430</link><description>I am having some problems running this code.  Here are some of them I've run across so far:&lt;br&gt;&lt;br&gt;1)for some strange reason "select-window *powershell*" doesn't return anything even though "select-window *notepad*"  does&lt;br&gt;&lt;br&gt;for the following problems, "$window = select-window *notepad*"&lt;br&gt;&lt;br&gt;2)Both "get-windowposition $window" and "$window | get-windowposition" will not recognize $window as a parameter&lt;br&gt;&lt;br&gt;This happens with remove-window, and send-keys&lt;br&gt;&lt;br&gt;3) "set-windowposition -width 2" does nothing and "set-windowposition $window -maximize " gives and error&lt;br&gt;&lt;br&gt;&lt;br&gt;I can send the code I am trying with the errors if necessary</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Evan</dc:creator><pubDate>Mon, 19 May 2008 10:42:23 -0000</pubDate></item><item><title>Re: Window GUI Automation from PowerShell</title><link>http://HuddledMasses.org/window-gui-automation-from-powershell/#comment-2587428</link><description>Thanks for writing this, Joel!  I've used it to automate the installation of our product on my development laptop, which I have to do very frequently.  I've had a batch file for a year that would un-install the product but didn't want to load our QA app just to automate the install.  Now I've done it with your DLL and PowerShell in a very lightweight fashion!  I wrote a PowerShell script to read an "instruction" file that looks like:&lt;br&gt;&lt;br&gt;RUN,c:\temp\setup.exe&lt;br&gt;SLEEP,15&lt;br&gt;WINDOW,msiexec&lt;br&gt;KEYS,{ENTER}&lt;br&gt;SLEEP,2&lt;br&gt;KEYS,{UP}&lt;br&gt;KEYS,{ENTER}&lt;br&gt;SLEEP,2&lt;br&gt;KEYS,{ENTER}&lt;br&gt;SLEEP,2&lt;br&gt;KEYS,{ENTER}&lt;br&gt;SLEEP,2&lt;br&gt;KEYS,{ENTER}&lt;br&gt;SLEEP,2&lt;br&gt;KEYS,{TAB}&lt;br&gt;KEYS,{TAB}&lt;br&gt;KEYS,{TAB}&lt;br&gt;KEYS,mySqlPassword&lt;br&gt;KEYS,{TAB}&lt;br&gt;KEYS,{END}&lt;br&gt;KEYS,\SQL2005&lt;br&gt;KEYS,{ENTER}&lt;br&gt;SLEEP,2&lt;br&gt;KEYS,{ENTER}&lt;br&gt;SLEEP,2&lt;br&gt;KEYS,{ENTER}&lt;br&gt;SLEEP,2&lt;br&gt;KEYS,{ENTER}&lt;br&gt;SLEEP,2&lt;br&gt;KEYS,{ENTER}&lt;br&gt;SLEEP,2&lt;br&gt;KEYS,{ENTER}&lt;br&gt;SLEEP,2&lt;br&gt;WAITFORBUTTON,&amp;amp;Finish,10,{ENTER}&lt;br&gt;&lt;br&gt;The WINDOW instruction is only specified at the beginning of the file so that when the script reads the KEYS command, it knows which window to which to send the keystrokes.  On most of the screens, I just hit enter but you can probably see one where I enter a SQL password.&lt;br&gt;&lt;br&gt;My script reads each line and executes the appropriate command using your DLL.  I still have the RUN one to complete but everything else works.  The WAITFORBUTTON instruction will cause my script to look for the Finish button and it not found, keep checking every 10 seconds and when found, hit Enter.&lt;br&gt;&lt;br&gt;Again, when I get the RUN instruction implemented, I'll send you the PS1 file and a sample instruction file.  My network admin guy drooled a lot when he saw what I had done and wants to automate all the boring installs/upgrades he has to do all the time.&lt;br&gt;&lt;br&gt;Many thanks again!&lt;br&gt;George</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">George Davis</dc:creator><pubDate>Tue, 01 Apr 2008 10:15:02 -0000</pubDate></item></channel></rss>