<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Answer My Searches &#187; GUI Automation</title>
	<atom:link href="http://www.answermysearches.com/category/gui-automation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.answermysearches.com</link>
	<description>Answers to everything I search for, every day</description>
	<lastBuildDate>Sat, 04 Feb 2012 20:36:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to Send F6 with Only a Number Pad (Stupid Python Tricks)</title>
		<link>http://www.answermysearches.com/how-to-send-f6-with-only-a-number-pad-stupid-python-tricks/215/</link>
		<comments>http://www.answermysearches.com/how-to-send-f6-with-only-a-number-pad-stupid-python-tricks/215/#comments</comments>
		<pubDate>Fri, 22 Dec 2006 23:34:08 +0000</pubDate>
		<dc:creator>Greg Pinero (Primary Searcher)</dc:creator>
				<category><![CDATA[GUI Automation]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[win32]]></category>

		<guid isPermaLink="false">http://www.answermysearches.com/index.php/how-to-send-f6-with-only-a-number-pad-stupid-python-tricks/215/</guid>
		<description><![CDATA[This little script will detect when you hit certain number pad numbers and send the specified function keys on to Windows instead:

import win32com.client
import pythoncom
import pyHook # http://sourceforge.net/projects/uncassist

def translate_keystrokes(event):
    if event.Key=='Numpad6': #Next in Screen Saver
        print 'You hit numpad 6!'
       [...]]]></description>
			<content:encoded><![CDATA[<p>This little script will detect when you hit certain number pad numbers and send the specified function keys on to Windows instead:</p>
<pre class="Python">
import win32com.client
import pythoncom
import pyHook # http://sourceforge.net/projects/uncassist

def translate_keystrokes(event):
    if event.Key=='Numpad6': #Next in Screen Saver
        print 'You hit numpad 6!'
        shell.SendKeys("{F7}")
        return False #blocks keystroke
    elif event.Key=='Numpad4': #Previous in Screen Saver
        print 'You hit numpad 4!'
        shell.SendKeys("{F6}")
        return False #blocks keystroke
    else:
        return True #Key stroke continues to Windows apps  

#object to let us send keystrokes
shell = win32com.client.Dispatch("WScript.Shell")
# create a hook manager
hm = pyHook.HookManager()
# watch for all keyboard events
hm.KeyDown = translate_keystrokes
# set the hook
hm.HookKeyboard()
# wait forever
pythoncom.PumpMessages()
</pre>
<p><strong>Why on earth would I want to do this?</strong><br />
Well, this lets me control a <a href="http://www.web-screen-saver.com/home.html">screensaver application</a> with a <a href="http://www.tigerdirect.com/applications/SearchTools/item-details.asp?EdpNo=935354&#038;CatId=0">$10 number pad</a> so that the laptop controlling the display can be tucked away out of site.  The alternative was to buy this <a href="http://www.tigerdirect.com/applications/SearchTools/item-details.asp?EdpNo=518922&#038;CatId=536">$80 programmable keypad</a>.  (If you hadn&#8217;t guessed, the screen saver inflexibly requires F6 to move to the next page.)</p>
<p>To make this little script I followed the <a href="http://www.cs.unc.edu/~parente/tech/tr08.shtml">pyHook examples here</a>.  And figured out <a href="http://groups.google.com/group/comp.lang.python/browse_thread/thread/1c75f1850159dc65/d89554dfaa3c6e76?lnk=st&#038;q=How+do+I+send+keystrokes+to+a+console+window+in+Windows+XP&#038;rnum=1#d89554dfaa3c6e76">how to send keystrokes here</a>.</p>
<p>Finally <a href="http://www.winguides.com/scripting/reference.php?id=109">this page gives you a run down on what WScript.Shell does</a>.  And <a href="http://www.rutherfurd.net/python/sendkeys/">this project looks like another promising alternative for sending keystrokes</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.answermysearches.com/how-to-send-f6-with-only-a-number-pad-stupid-python-tricks/215/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Stop Locking My Computer After 15 Minutes Of Inactivity! (For Windows Server 2003 at least)</title>
		<link>http://www.answermysearches.com/stop-locking-my-computer-after-15-minutes-of-inactivity-for-windows-server-2003-at-least/13/</link>
		<comments>http://www.answermysearches.com/stop-locking-my-computer-after-15-minutes-of-inactivity-for-windows-server-2003-at-least/13/#comments</comments>
		<pubDate>Thu, 05 Jan 2006 23:20:12 +0000</pubDate>
		<dc:creator>Greg Pinero (Primary Searcher)</dc:creator>
				<category><![CDATA[GUI Automation]]></category>
		<category><![CDATA[VNC]]></category>
		<category><![CDATA[win32]]></category>

		<guid isPermaLink="false">http://www.answermysearches.com/?p=13</guid>
		<description><![CDATA[
This will make your computer (at least one running Windows Server 2003) never lock after inactivity and not require ctl-alt-del to login in.  It may be similar for Windows XP too.
Here&#8217;s the answer:

Goto Start>Run and type gpedit.msc 
Once it comes up go to computer configuration go to Windows>Settings>local policies>security options
(For Windows XP you&#8217;d go [...]]]></description>
			<content:encoded><![CDATA[<p><!--adsense--><br />
This will make your computer (at least one running Windows Server 2003) never lock after inactivity and not require ctl-alt-del to login in.  It may be similar for Windows XP too.</p>
<p><strong>Here&#8217;s the answer:</strong></p>
<ol>
<li>Goto Start>Run and type <strong>gpedit.msc</strong> </li>
<li>Once it comes up go to computer configuration go to <em>Windows>Settings>local policies>security options</em><br />
(For Windows XP you&#8217;d go to: <em>Windows Settings>Security Settings>Local Policies>Security Options</em>)</li>
<li>From there you will see the <strong>require Ctl-Alt-Del setting</strong>. Disable it. (I&#8217;m not sure if you need to do this and this isn&#8217;t shown here in Windows XP.)</li>
<li>Next find the one that says &#8220;<strong>Amount of idle time required before suspending session</strong>&#8221; and change it to its maximum value <strong>99999</strong>.</li>
</ol>
<p>I found part of this answer <a href="http://groups.google.com/group/microsoft.public.windows.server.general/browse_thread/thread/a44dd2a54e3fd700/1369d5c59f409c13?lnk=st&#038;q=%22Server+2003%22+lock+after+time&#038;rnum=9&#038;hl=en#1369d5c59f409c13">here</a>.</p>
<p>It was quite hard to to locate this gem of information on the web but here are all of the searches I tried:</p>
<ol class="searchqueries">
<li>&#8220;this computer is in use and has been locked&#8221;  #The message I want to not see</li>
<li>disable &#8220;this computer is in use and has been locked&#8221;</li>
<li>&#8220;Server 2003&#8243; lock after time</li>
<li>&#8220;Server 2003&#8243; auto logoff after set time</li>
<li>&#8220;Server 2003&#8243; locked</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.answermysearches.com/stop-locking-my-computer-after-15-minutes-of-inactivity-for-windows-server-2003-at-least/13/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fixing &#8211; AutoIt stops running/hangs under terminal services</title>
		<link>http://www.answermysearches.com/fixing-autoit-stops-runninghangs-under-terminal-services/6/</link>
		<comments>http://www.answermysearches.com/fixing-autoit-stops-runninghangs-under-terminal-services/6/#comments</comments>
		<pubDate>Thu, 22 Dec 2005 22:52:21 +0000</pubDate>
		<dc:creator>Greg Pinero (Primary Searcher)</dc:creator>
				<category><![CDATA[GUI Automation]]></category>
		<category><![CDATA[VNC]]></category>

		<guid isPermaLink="false">http://www.answermysearches.com/?p=6</guid>
		<description><![CDATA[Give up! .. don't run it under terminal services, try <a href="http://www.realvnc.com/">VNC </a>instead.]]></description>
			<content:encoded><![CDATA[<p><!--adsense--><br />
I wrote a nice <a href="http://www.autoitscript.com/autoit3/">AutoIt </a>script to automate Omnipage14 because it offered no way whatsoever for a Python script to control it.  Anyway everything worked except that I was running it under terminal services on another computer and whenever the terminal services window lost focus or I logged off, AutoIt just stopped running.  So I spent quite a while searching and found these solutions:</p>
<p>The short answer is:<br />
<strong>Give up! .. don&#8217;t run it under terminal services, try <a href="http://www.realvnc.com/">VNC </a>instead.</strong></p>
<p>The long answer is:<br />
I searched for too many terms to even recall.  I came across a lot of websites and a lot of advice for this problem.  The basic problem is that when you&#8217;re not actively using terminal services, the desktop and everything GUI goes away somehow.  That&#8217;s why Autoit stopped working.  I tried setting up the AutoIt script to run as a service but nothing happened when I launched the service and it seemed like an overly-complex solution to research any further.  The second solution I had come across (using VNC) seemed like a reasonable idea so I went that route and everything is now working fine.</p>
<p>Here are the discussions I found on this issue:<br />
<a href="http://www.autoitscript.com/forum/lofiversion/index.php?t4026.html">http://www.autoitscript.com/forum/lofiversion/index.php?t4026.html</a><br />
<a href="http://tinyurl.com/8yh3w">http://tinyurl.com/8yh3w</a><br />
<a href="http://tinyurl.com/7wmvy">http://tinyurl.com/7wmvy</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.answermysearches.com/fixing-autoit-stops-runninghangs-under-terminal-services/6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

