<?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>nerdnotes.org &#187; MS Windows</title>
	<atom:link href="http://nerdnotes.org/category/nerdnotes/ms-windows/feed/" rel="self" type="application/rss+xml" />
	<link>http://nerdnotes.org</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 08 Apr 2010 20:17:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Scripting the Unscriptable</title>
		<link>http://nerdnotes.org/2006/10/scripting-the-unscriptable/</link>
		<comments>http://nerdnotes.org/2006/10/scripting-the-unscriptable/#comments</comments>
		<pubDate>Wed, 11 Oct 2006 21:49:44 +0000</pubDate>
		<dc:creator>Bram</dc:creator>
				<category><![CDATA[MS Windows]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nerdnotes]]></category>

		<guid isPermaLink="false">68</guid>
		<description><![CDATA[I&#8217;ve been looking for different ways to send keystrokes, mouse movements and clicks to GUI applications. Under Windows, this is straight forward with AutoIt. The BASIC-like language allows you to read files, start applications, send keystrokes move the mouse etc. A nice feature is to wait for certain dialogs, for example:

; wait for tightvnc window
WinWaitActive(&#34;New [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been looking for different ways to send keystrokes, mouse movements and clicks to GUI applications. Under Windows, this is straight forward with AutoIt. The BASIC-like language allows you to read files, start applications, send keystrokes move the mouse etc. A nice feature is to wait for certain dialogs, for example:</p>
<pre class="brush: css;">
; wait for tightvnc window
WinWaitActive(&quot;New TightVNC Connection&quot;)
; send hostname and port number
Send($hostname &amp; &quot;:&quot; &amp; $displaynumber)
</pre>
<p>This makes sure that the keystrokes actually end up in the right window. Mouse coordinates can be specified relative to the application window. Using these features allows you to write &#8216;reasonably&#8217; robust code. But don&#8217;t expect your AutoIt script to run flawlessly on other PC&#8217;s. There are a lot of dependencies, like dialogs that look different in another version. Internationalization might cause the window title to read &#8220;Nieuwe TightVNC Verbinding&#8221; (Dutch) and the above code snippet will fail. Even user preferences like font sizes,  window themes and screen resolution might result in unexpected behavior.</p>
<p>Anyway, it&#8217;s just fun to figure out which sequences to send to an application and let it process a batch of documents!<br />
Ok, this works pretty nice under windows. But what about my favorite platform?<br />
<span id="more-68"></span><br />
I thought it couldn&#8217;t be difficult manipulating mouse clicks and keystrokes with the Penguin&#8230;<br />
Well, the most difficult task was collecting the required tools! I ended up with vnc and <a href="http://cyberelk.net/tim/rfbplaymacro/index.html">rfbplaymacro</a>.<br />
Let me explain <img src='http://nerdnotes.org/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> . VNC uses the RFB (Remote FrameBuffer) protocol to remotely control another computer. While vncviewer (vnc client) is an interactive application (you interact with the remote computer as if you where sitting behind it), rfbplaymacro is &#8216;headless&#8217;. It allows you to send over the keystrokes and mouse clicks, but it doesn&#8217;t show you what happens. Instead of actually using your mouse and keyboard, rfbplaymacro expects a macro fed into stdin. The macro is a plain text list of mouse and keyboard events. The demo macro that is supplied with the <a href="http://cyberelk.net/tim/data/rfbplaymacro/stable/rfbplaymacro-0.2.2.tar.bz2">rfbplaymacro source code</a> displays an xclock for 10 seconds:</p>
<pre class="brush: css;">
RFM 001.000
password &quot;mypasswd123&quot;
pointer 100 20 delay 1s
type &quot;xclock -geometry +400+200 &amp;&quot;
press Return
type &quot;xkill&quot;
press Return
pointer 410 210 delay 10s
click 0
</pre>
<p>The first line tells the parser which of the possible macro versions is used. I&#8217;ve only seen just one version. The <tt>password</tt> statement is optional, it&#8217;s also possible to specify the password when playing the macro, see the next code snippet. This script assumes the remote desktop runs an xterminal in the upper left of the screen. By moving the mouse to the upper left (<tt>pointer 100 20</tt>), the xterm gets the input focus (depending on the window manager). After the mouse movement, the macro pauses for one second, specified by <tt>delay</tt>. Then the xclock is started in the background, by typing the <tt>xclock</tt> command and hitting return. Xkill is fired up in the same fashion. The mouse pointer is transformed in a deadly weapon! Another pointer instruction moves the cursor to xclock. The dangling &#8216;Sword of Damocles` is hanging for the full 10 seconds before final and deadly mouse click is sent.</p>
<p>To play back this rather useless, but illustrating macro, use:</p>
<pre class="brush: css;">
$ rfbplaymacro --server=linuxbox:9 &lt; test.rfm
</pre>
<p>This will connect to a running vncserver (desktop :9) on &#8216;linuxbox&#8217; and sends over the mouse and keyboard events specified in the marcro <tt>test.rfm</tt>. Connect a vncviewer to the same desktop and you will see it happen!</p>
]]></content:encoded>
			<wfw:commentRss>http://nerdnotes.org/2006/10/scripting-the-unscriptable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>One finger melody</title>
		<link>http://nerdnotes.org/2006/05/one-finger-melody/</link>
		<comments>http://nerdnotes.org/2006/05/one-finger-melody/#comments</comments>
		<pubDate>Thu, 11 May 2006 15:26:27 +0000</pubDate>
		<dc:creator>Bram</dc:creator>
				<category><![CDATA[MS Windows]]></category>
		<category><![CDATA[nerdnotes]]></category>

		<guid isPermaLink="false">51</guid>
		<description><![CDATA[Enjoy the silence after tapping this sequence on your keyboard (Windows only):


Shift
Shift
Shift
Shift
Shift
Enter
Alt
Ctrl
Del
S
Enter

]]></description>
			<content:encoded><![CDATA[<p>Enjoy the silence after tapping this sequence on your keyboard (Windows only):</p>
<p>
<pre class="brush: plain;">
Shift
Shift
Shift
Shift
Shift
Enter
Alt
Ctrl
Del
S
Enter
</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://nerdnotes.org/2006/05/one-finger-melody/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Tightvnc viewer startup script</title>
		<link>http://nerdnotes.org/2006/04/tightvnc-viewer-startup-script/</link>
		<comments>http://nerdnotes.org/2006/04/tightvnc-viewer-startup-script/#comments</comments>
		<pubDate>Wed, 26 Apr 2006 11:02:09 +0000</pubDate>
		<dc:creator>Bram</dc:creator>
				<category><![CDATA[MS Windows]]></category>
		<category><![CDATA[nerdnotes]]></category>

		<guid isPermaLink="false">50</guid>
		<description><![CDATA[Today, I wrote a little AutoIt script that connects to a vnc server when starting my windows computer. If you are interested, here you are!
]]></description>
			<content:encoded><![CDATA[<p>Today, I wrote a little AutoIt script that connects to a vnc server when starting my windows computer. If you are interested, <a href="http://nerdnotes.org/scripts/vnc.au3.php">here you are</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://nerdnotes.org/2006/04/tightvnc-viewer-startup-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exposé voor Windows</title>
		<link>http://nerdnotes.org/2005/12/expose-voor-windows/</link>
		<comments>http://nerdnotes.org/2005/12/expose-voor-windows/#comments</comments>
		<pubDate>Mon, 12 Dec 2005 19:19:01 +0000</pubDate>
		<dc:creator>Bram</dc:creator>
				<category><![CDATA[MS Windows]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nerdnotes]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">33</guid>
		<description><![CDATA[Alleen voor Firefox gebruikers dan&#8230; en ook voor Linux en Mac OS X. Heb je al Firefox 1.5? Werk je regelmatig met tabs? dan moet je deze extensie beslist installeren. Na de installatie krijg je een knopje links onderin de status balk. Hiermee kun je alle tabs als miniaturen naast elkaar te zien krijgen&#8230;. dus net als [...]]]></description>
			<content:encoded><![CDATA[<p>Alleen voor Firefox gebruikers dan&#8230; en ook voor Linux en Mac OS X. Heb je al <a href="http://www.mozilla.com/firefox/">Firefox 1.5</a>? Werk je regelmatig met <a href="http://www.mozilla.com/firefox/tabs.html">tabs</a>? dan moet je <a href="https://addons.mozilla.org/extensions/moreinfo.php?application=firefox&#038;id=1457">deze extensie</a> beslist installeren. Na de installatie krijg je een knopje links onderin de status balk. Hiermee kun je alle tabs als miniaturen naast elkaar te zien krijgen&#8230;. dus net als bij <a href="http://www.apple.com/macosx/features/expose/">Exposé</a>.<br />
Nou ja, het haalt het er nog niet bij. Het is niet geanimeerd en het is jammer dat je niet terug keert naar je huidige tab als je nog een keer op de knop drukt.</p>
<p>Short-cut: Ctrl + Shift + x, op de Mac is het Appeltje + Shift + x.</p>
<p>Trouwens, er <b>is</b> iets als Exposé voor Windows: <a href="http://www.oxygen-inc.com/premium/InsaniSoft/iEx.htm">IEx</a>, WinPLOSION, <a href="http://www.entbloess.com">Entbloess</a> en Windows Exposer&#8230; ik ga ze niet eens proberen <img src='http://nerdnotes.org/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://nerdnotes.org/2005/12/expose-voor-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Seriele Terminal voor Windows</title>
		<link>http://nerdnotes.org/2005/11/seriele-terminal-voor-windows/</link>
		<comments>http://nerdnotes.org/2005/11/seriele-terminal-voor-windows/#comments</comments>
		<pubDate>Tue, 15 Nov 2005 22:43:18 +0000</pubDate>
		<dc:creator>Bram</dc:creator>
				<category><![CDATA[MS Windows]]></category>
		<category><![CDATA[nerdnotes]]></category>

		<guid isPermaLink="false">31</guid>
		<description><![CDATA[Voor een aantal embedded projectjes gebruik ik Hyperterminal om met de seriele poort te praten. HT is echt een draak van een programma. Elke keer begint het weer om telefoonnummers te vragen terwijl je uiteindelijk gewoon wilt aangeven dat je met bv. COM1 wilt praten. Er lijken niet echt veel goede gratis/open source alternatieven te [...]]]></description>
			<content:encoded><![CDATA[<p>Voor een aantal embedded projectjes gebruik ik Hyperterminal om met de seriele poort te praten. HT is echt een draak van een programma. Elke keer begint het weer om telefoonnummers te vragen terwijl je uiteindelijk gewoon wilt aangeven dat je met bv. COM1 wilt praten. Er lijken niet echt veel goede gratis/open source alternatieven te vinden zijn.</p>
<p>Vandaag weer een poging ondernomen. Er blijkt een PuTTY clone te zijn, genaamd <a href="http://putty.dwalin.ru/">TuTTY</a>, met support voor seriele communicatie. Misschien wordt het ooit standaard in PuTTY opgenomen, maar dat is een kwestie van afwachten (het staat wel in de <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/wishlist/serial-backend.html">wish-list</a>).<br />
Nog eleganter is het gebruik van <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">PuTTY</a> in combinatie met <a href="http://www.elifulkerson.com/projects/telnet-serial-bridge.php">tsb</a>. Tsb is een dos programma&#8217;tje (GPL) dat een schakel vormt tussen de seriele poort en een TCP poort. Als tsb opgestart is, kun je met PuTTY contact leggen met localhost en de betreffende poort die je met tsb hebt opgegeven. </p>
<p>Heel fijn om uiteindelijk toch weer gewoon met PuTTY te kunnen werken!!<br />
Onder linux gebruik ik overigens <a href="http://www.jls-info.com/julien/linux/">gtkterm</a>, itt HT zeer makkelijk te gebruiken!</p>
]]></content:encoded>
			<wfw:commentRss>http://nerdnotes.org/2005/11/seriele-terminal-voor-windows/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Administrator wachtwoord vergeten?</title>
		<link>http://nerdnotes.org/2005/04/administrator-wachtwoord-vergeten/</link>
		<comments>http://nerdnotes.org/2005/04/administrator-wachtwoord-vergeten/#comments</comments>
		<pubDate>Tue, 12 Apr 2005 06:25:41 +0000</pubDate>
		<dc:creator>Bram</dc:creator>
				<category><![CDATA[MS Windows]]></category>
		<category><![CDATA[nerdnotes]]></category>

		<guid isPermaLink="false">20</guid>
		<description><![CDATA[Dan reset je &#8216;m toch gewoon?
]]></description>
			<content:encoded><![CDATA[<p>Dan <a href="http://home.eunet.no/~pnordahl/ntpasswd/">reset</a> je &#8216;m toch gewoon?</p>
]]></content:encoded>
			<wfw:commentRss>http://nerdnotes.org/2005/04/administrator-wachtwoord-vergeten/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows scripten met AutoIT</title>
		<link>http://nerdnotes.org/2005/04/windows-scripten-met-autoit/</link>
		<comments>http://nerdnotes.org/2005/04/windows-scripten-met-autoit/#comments</comments>
		<pubDate>Sun, 10 Apr 2005 09:33:01 +0000</pubDate>
		<dc:creator>Bram</dc:creator>
				<category><![CDATA[MS Windows]]></category>
		<category><![CDATA[nerdnotes]]></category>

		<guid isPermaLink="false">19</guid>
		<description><![CDATA[AutoIT is een fantastisch programma waarmee vrijwel elke handeling onder Windows te automatiseren is. Met eenvoudige commando&#8217;s kun je programma&#8217;s opstarten en de controle over de muis en het toetsenbord overnemen.
Een must voor iedere luie systeembeheerder. Je kunt vanuit je script GUI objecten aanmaken (zoals knoppen, lijsten en checkboxen) waardoor je script de look en [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.autoitscript.com/autoit3/">AutoIT</a> is een fantastisch programma waarmee vrijwel elke handeling onder Windows te automatiseren is. Met eenvoudige commando&#8217;s kun je programma&#8217;s opstarten en de controle over de muis en het toetsenbord overnemen.<br />
Een must voor iedere luie systeembeheerder. Je kunt vanuit je script GUI objecten aanmaken (zoals knoppen, lijsten en checkboxen) waardoor je script de look en feel van echte applicatie krijgt. Je kunt heel eenvoudig je script converteren naar een stand-alone executable. AutoIT is open source, gratis en het draait onder Windows 95, 98, ME, NT4, 2000, XP en 2003!</p>
<p>Ik heb laatst <a href="http://www.autoitscript.com/forum/index.php?showtopic=8947&#038;view=findpost&#038;p=63663">deze functie</a> geschreven waarmee je makkelijk command-line programmaatjes kan integreren.
</p>
<p>Zie ook mijn <a href="http://nerdnotes.org/index.php/2006/04/26/tightvnc-viewer-startup-script/">vncviewer startup script</a>. Het maakt gebruik van de meest voorkomende functies die je nodig hebt om een willekeurig windows programma te scripten.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerdnotes.org/2005/04/windows-scripten-met-autoit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Screenshots</title>
		<link>http://nerdnotes.org/2005/03/screenshots/</link>
		<comments>http://nerdnotes.org/2005/03/screenshots/#comments</comments>
		<pubDate>Sun, 27 Mar 2005 00:53:03 +0000</pubDate>
		<dc:creator>Bram</dc:creator>
				<category><![CDATA[MS Windows]]></category>
		<category><![CDATA[imagemagick]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nerdnotes]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">16</guid>
		<description><![CDATA[Linux:
Voor het maken van een screenshotje van een applicatievenster inclusief rand:

$ import -frame screenshot.png


Het eerste-de-beste scherm dat je aanklikt wordt opgeslagen in screenshot.png. Zie manpage van import voor meer opties.
Mac OS X: Deze toetscombinaties moet je maar net even weten&#8230;. Voor het volledige scherm doe je &#8220;Appeltje + Shift + 3&#8243;. Voor een selectie &#8220;Appeltje [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Linux:</strong><br />
Voor het maken van een screenshotje van een applicatievenster inclusief rand:</p>
<pre class="brush: css;">
$ import -frame screenshot.png
</pre>
<p>
Het eerste-de-beste scherm dat je aanklikt wordt opgeslagen in screenshot.png. Zie manpage van import voor meer opties.</p>
<p><strong>Mac OS X:</strong> Deze toetscombinaties moet je maar net even weten&#8230;. Voor het volledige scherm doe je &#8220;Appeltje + Shift + 3&#8243;. Voor een selectie &#8220;Appeltje + Shift + 4&#8243;. In beide gevallen wordt er automatisch een PDFje op je desktop aangemaakt. Ook kun je Appeltje + Shift + 4 + spatie doen. Je muis pijltje verandert in een camera waarmee je een scherm kunt selekteren. Als je klikt wordt er een screenshot van alleen dat scherm gemaakt!</p>
<p><strong>Windows:</strong> Hier kun je de &#8220;Alt + Print Screen&#8221; toetscombinatie gebruiken. Een bitmap-afbeelding van het actieve venster wordt naar het klembord gekopieerd. Plakken kan dan vervolgens in elk programma die iets met plaatjes overweg kan: Paint, Word, Photoshop, etc.<br />
Alleen de PrintScreen-knop indrukken stuurt het gehele scherm naar het klembord.</p>
<p><img src="http://oase.uci.ru.nl/~bradaa/nerdnotes.org/wp-content/screenshotje.png" alt="Screenshotje" /></p>
]]></content:encoded>
			<wfw:commentRss>http://nerdnotes.org/2005/03/screenshots/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Windows op slot</title>
		<link>http://nerdnotes.org/2005/03/windows-op-slot/</link>
		<comments>http://nerdnotes.org/2005/03/windows-op-slot/#comments</comments>
		<pubDate>Sun, 27 Mar 2005 00:45:04 +0000</pubDate>
		<dc:creator>Bram</dc:creator>
				<category><![CDATA[MS Windows]]></category>
		<category><![CDATA[nerdnotes]]></category>

		<guid isPermaLink="false">15</guid>
		<description><![CDATA[Met de volgende code in een shortcut of quicklaunch icoontje, kun je direkt je Windows sessie op slot doen:
rundll32.exe user32.dll,LockWorkStation
Dit kun je ook in de &#8216;taskmanager&#8217; stoppen om bijvoorbeeld je computer op slot te doen op het moment dat je deze 15 minuten niet meer gebruikt hebt.
]]></description>
			<content:encoded><![CDATA[<p>Met de volgende code in een shortcut of quicklaunch icoontje, kun je direkt je Windows sessie op slot doen:</p>
<pre class="brush: plain;">rundll32.exe user32.dll,LockWorkStation</pre>
<p>Dit kun je ook in de &#8216;taskmanager&#8217; stoppen om bijvoorbeeld je computer op slot te doen op het moment dat je deze 15 minuten niet meer gebruikt hebt.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerdnotes.org/2005/03/windows-op-slot/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Windows2k tab completion</title>
		<link>http://nerdnotes.org/2005/03/windows2k-tab-completion/</link>
		<comments>http://nerdnotes.org/2005/03/windows2k-tab-completion/#comments</comments>
		<pubDate>Sat, 19 Mar 2005 15:21:25 +0000</pubDate>
		<dc:creator>Bram</dc:creator>
				<category><![CDATA[MS Windows]]></category>
		<category><![CDATA[nerdnotes]]></category>

		<guid isPermaLink="false">12</guid>
		<description><![CDATA[Om tab completion aan te zetten voor de commandline van Windows2000 of WindowsXP, start regedit en wijzig de volgende key:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor] &#34;PathCompletionChar&#34;=dword:00000009
&#8216;9&#8242; staat voor de tab toets. Start het &#8216;dos&#8217; venster opnieuw en je zult zien dat de tab toets bijna hetzelfde werkt zoals je het van bash gewend bent.
]]></description>
			<content:encoded><![CDATA[<p>Om tab completion aan te zetten voor de commandline van Windows2000 of WindowsXP, start regedit en wijzig de volgende key:</p>
<pre class="brush: plain;">[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor] &quot;PathCompletionChar&quot;=dword:00000009</pre>
<p>&#8216;9&#8242; staat voor de tab toets. Start het &#8216;dos&#8217; venster opnieuw en je zult zien dat de tab toets bijna hetzelfde werkt zoals je het van bash gewend bent.</p>
]]></content:encoded>
			<wfw:commentRss>http://nerdnotes.org/2005/03/windows2k-tab-completion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
