<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>i__h4x programming?</title>
	<atom:link href="http://ih4x.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://ih4x.wordpress.com</link>
	<description></description>
	<lastBuildDate>Sat, 28 Mar 2009 16:59:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='ih4x.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>i__h4x programming?</title>
		<link>http://ih4x.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://ih4x.wordpress.com/osd.xml" title="i__h4x programming?" />
	<atom:link rel='hub' href='http://ih4x.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Vb Net Function &#8211; GetWindowPos</title>
		<link>http://ih4x.wordpress.com/2008/05/21/vb-net-function-getwindowpos/</link>
		<comments>http://ih4x.wordpress.com/2008/05/21/vb-net-function-getwindowpos/#comments</comments>
		<pubDate>Wed, 21 May 2008 17:24:04 +0000</pubDate>
		<dc:creator>sim0n</dc:creator>
				<category><![CDATA[VB.net]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[window function]]></category>

		<guid isPermaLink="false">http://ih4x.wordpress.com/2008/05/21/vb-net-function-getwindowpos/</guid>
		<description><![CDATA[This blog has moved New location: http://sim0n.wordpress.com/ Posts matching query: [VB.Net] GetWindowPos<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ih4x.wordpress.com&amp;blog=3140361&amp;post=44&amp;subd=ih4x&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:center;"><strong>This blog has moved</strong><br />
New location: <a href="http://sim0n.wordpress.com/">http://sim0n.wordpress.com/</a></p>
<p style="text-align:center;">Posts matching query:<br />
<a href="http://sim0n.wordpress.com/2009/03/28/vbnet-getwindowpos/">[VB.Net] GetWindowPos</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ih4x.wordpress.com/44/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ih4x.wordpress.com/44/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ih4x.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ih4x.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ih4x.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ih4x.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ih4x.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ih4x.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ih4x.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ih4x.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ih4x.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ih4x.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ih4x.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ih4x.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ih4x.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ih4x.wordpress.com/44/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ih4x.wordpress.com&amp;blog=3140361&amp;post=44&amp;subd=ih4x&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ih4x.wordpress.com/2008/05/21/vb-net-function-getwindowpos/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/810cb4ebed3e0db0c0d9777516931db0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sim0n</media:title>
		</media:content>
	</item>
		<item>
		<title>Vb Net &#8211; Change MSN Name</title>
		<link>http://ih4x.wordpress.com/2008/05/18/vb-net-change-msn-name/</link>
		<comments>http://ih4x.wordpress.com/2008/05/18/vb-net-change-msn-name/#comments</comments>
		<pubDate>Sun, 18 May 2008 17:18:51 +0000</pubDate>
		<dc:creator>sim0n</dc:creator>
				<category><![CDATA[VB.net]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[MSN]]></category>
		<category><![CDATA[Name changer]]></category>
		<category><![CDATA[SendMessage]]></category>
		<category><![CDATA[spammer]]></category>

		<guid isPermaLink="false">http://ih4x.wordpress.com/?p=43</guid>
		<description><![CDATA[This is just a slightly more efficient way to change your MSN name than using SendKeys. It uses the SendMessage API in order to set the text, rather than SendKeys. The code is pretty fully commented, and so there is nothing much to explain… Below is the full source file: Imports System.Runtime.InteropServices Public Class Form1 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ih4x.wordpress.com&amp;blog=3140361&amp;post=43&amp;subd=ih4x&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="MsoNoSpacing">This is just a slightly more efficient way to change your MSN name than using SendKeys.</p>
<p class="MsoNoSpacing">It uses the SendMessage API in order to set the text, rather than SendKeys.</p>
<p class="MsoNoSpacing">
<p class="MsoNoSpacing">The code is pretty fully commented, and so there is nothing much to explain…</p>
<p class="MsoNoSpacing">Below is the full source file:</p>
<p class="MsoNoSpacing">
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;">Imports</span><span style="font-size:10pt;"> System.Runtime.InteropServices</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;">Public</span><span style="font-size:10pt;"> <span style="color:blue;">Class</span> Form1</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;API</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>&lt;DllImport(<span style="color:#a31515;">&#8220;User32.dll&#8221;</span>)&gt; <span style="color:blue;">Private</span> <span style="color:blue;">Shared</span> <span style="color:blue;">Function</span> EnumChildWindows(<span style="color:blue;">ByVal</span> WindowHandle <span style="color:blue;">As</span> IntPtr, <span style="color:blue;">ByVal</span> Callback <span style="color:blue;">As</span> EnumWindowProcess, <span style="color:blue;">ByVal</span> lParam <span style="color:blue;">As</span> IntPtr) <span style="color:blue;">As</span> <span style="color:blue;">Boolean</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Function</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>&lt;DllImport(<span style="color:#a31515;">&#8220;user32.dll&#8221;</span>, CharSet:=CharSet.Auto)&gt; <span style="color:blue;">Private</span> <span style="color:blue;">Shared</span> <span style="color:blue;">Sub</span> GetClassName(<span style="color:blue;">ByVal</span> hWnd <span style="color:blue;">As</span> System.IntPtr, <span style="color:blue;">ByVal</span> lpClassName <span style="color:blue;">As</span> System.Text.StringBuilder, <span style="color:blue;">ByVal</span> nMaxCount <span style="color:blue;">As</span> <span style="color:blue;">Integer</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Sub</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>&lt;DllImport(<span style="color:#a31515;">&#8220;user32.dll&#8221;</span>, SetLastError:=<span style="color:blue;">True</span>, CharSet:=CharSet.Auto)&gt; <span style="color:blue;">Private</span> <span style="color:blue;">Shared</span> <span style="color:blue;">Function</span> GetWindowText(<span style="color:blue;">ByVal</span> hwnd <span style="color:blue;">As</span> IntPtr, <span style="color:blue;">ByVal</span> lpString <span style="color:blue;">As</span> System.Text.StringBuilder, <span style="color:blue;">ByVal</span> cch <span style="color:blue;">As</span> <span style="color:blue;">Integer</span>) <span style="color:blue;">As</span> <span style="color:blue;">Integer</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Function</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>&lt;DllImport(<span style="color:#a31515;">&#8220;user32.dll&#8221;</span>, SetLastError:=<span style="color:blue;">True</span>, CharSet:=CharSet.Auto)&gt; <span style="color:blue;">Private</span> <span style="color:blue;">Shared</span> <span style="color:blue;">Function</span> GetWindowTextLength(<span style="color:blue;">ByVal</span> hwnd <span style="color:blue;">As</span> IntPtr) <span style="color:blue;">As</span> <span style="color:blue;">Integer</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Function</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Declare</span> <span style="color:blue;">Auto</span> <span style="color:blue;">Function</span> SendMessage <span style="color:blue;">Lib</span> <span style="color:#a31515;">&#8220;user32&#8243;</span> (<span style="color:blue;">ByVal</span> hwnd <span style="color:blue;">As</span> IntPtr, <span style="color:blue;">ByVal</span> wMsg <span style="color:blue;">As</span> <span style="color:blue;">Integer</span>, <span style="color:blue;">ByVal</span> wparam <span style="color:blue;">As</span> <span style="color:blue;">Integer</span>, <span style="color:blue;">ByVal</span> lparam <span style="color:blue;">As</span> System.Text.StringBuilder) <span style="color:blue;">As</span> IntPtr</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Declare</span> <span style="color:blue;">Auto</span> <span style="color:blue;">Function</span> SendMessage <span style="color:blue;">Lib</span> <span style="color:#a31515;">&#8220;user32&#8243;</span> (<span style="color:blue;">ByVal</span> hWnd <span style="color:blue;">As</span> IntPtr, <span style="color:blue;">ByVal</span> msg <span style="color:blue;">As</span> <span style="color:blue;">Integer</span>, <span style="color:blue;">ByVal</span> wParam <span style="color:blue;">As</span> IntPtr, <span style="color:blue;">ByVal</span> lParam <span style="color:blue;">As</span> <span style="color:blue;">String</span>) <span style="color:blue;">As</span> IntPtr</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Declare</span> <span style="color:blue;">Auto</span> <span style="color:blue;">Function</span> FindWindow <span style="color:blue;">Lib</span> <span style="color:#a31515;">&#8220;user32&#8243;</span> (<span style="color:blue;">ByVal</span> lpClassName <span style="color:blue;">As</span> <span style="color:blue;">String</span>, <span style="color:blue;">ByVal</span> lpWindowName <span style="color:blue;">As</span> <span style="color:blue;">String</span>) <span style="color:blue;">As</span> IntPtr</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;API Functions</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Shared</span> <span style="color:blue;">Function</span> GetChildWindows(<span style="color:blue;">ByVal</span> ParentHandle <span style="color:blue;">As</span> IntPtr) <span style="color:blue;">As</span> IntPtr()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Dim</span> ChildrenList <span style="color:blue;">As</span> <span style="color:blue;">New</span> List(<span style="color:blue;">Of</span> IntPtr)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Dim</span> ListHandle <span style="color:blue;">As</span> GCHandle = GCHandle.Alloc(ChildrenList)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Try</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>EnumChildWindows(ParentHandle, <span style="color:blue;">AddressOf</span> EnumWindow, GCHandle.ToIntPtr(ListHandle))</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Finally</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">If</span> ListHandle.IsAllocated <span style="color:blue;">Then</span> ListHandle.Free()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Try</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Return</span> ChildrenList.ToArray</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Function</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Shared</span> <span style="color:blue;">Function</span> EnumWindow(<span style="color:blue;">ByVal</span> Handle <span style="color:blue;">As</span> IntPtr, <span style="color:blue;">ByVal</span> Parameter <span style="color:blue;">As</span> IntPtr) <span style="color:blue;">As</span> <span style="color:blue;">Boolean</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Dim</span> ChildrenList <span style="color:blue;">As</span> List(<span style="color:blue;">Of</span> IntPtr) = GCHandle.FromIntPtr(Parameter).Target</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">If</span> ChildrenList <span style="color:blue;">Is</span> <span style="color:blue;">Nothing</span> <span style="color:blue;">Then</span> <span style="color:blue;">Throw</span> <span style="color:blue;">New</span> Exception(<span style="color:#a31515;">&#8220;GCHandle Target could not be cast as List(Of IntPtr)&#8221;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>ChildrenList.Add(Handle)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Return</span> <span style="color:blue;">True</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Function</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Public</span> <span style="color:blue;">Shared</span> <span style="color:blue;">Function</span> GetText(<span style="color:blue;">ByVal</span> hWnd <span style="color:blue;">As</span> IntPtr) <span style="color:blue;">As</span> <span style="color:blue;">String</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Dim</span> length <span style="color:blue;">As</span> <span style="color:blue;">Integer</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">If</span> hWnd.ToInt32 &lt;= 0 <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Return</span> <span style="color:blue;">Nothing</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>length = GetWindowTextLength(hWnd)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">If</span> length = 0 <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Return</span> <span style="color:blue;">Nothing</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Dim</span> sb <span style="color:blue;">As</span> <span style="color:blue;">New</span> System.Text.StringBuilder(<span style="color:#a31515;">&#8220;&#8221;</span>, length + 1)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span> </span>GetWindowText(hWnd, sb, sb.Capacity)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Return</span> sb.ToString()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Function</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;Constants</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Const</span> WM_SETTEXT = &amp;HC</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Const</span> WM_CHAR = &amp;H102</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Const</span> WM_KEYDOWN = &amp;H100</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Const</span> WM_KEYUP = &amp;H101</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Const</span> WM_SETFOCUS = &amp;H7</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;Window Enum Delegate</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Delegate</span> <span style="color:blue;">Function</span> EnumWindowProcess(<span style="color:blue;">ByVal</span> Handle <span style="color:blue;">As</span> IntPtr, <span style="color:blue;">ByVal</span> Parameter <span style="color:blue;">As</span> IntPtr) <span style="color:blue;">As</span> <span style="color:blue;">Boolean</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;This function finds the Handle for the MSN Options window</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Shared</span> <span style="color:blue;">Function</span> FindMSN() <span style="color:blue;">As</span> IntPtr</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>FindMSN = FindWindow(vbNullString, <span style="color:#a31515;">&#8220;Options&#8221;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Function</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;This function Sends the text to the Options window</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Public</span> <span style="color:blue;">Shared</span> <span style="color:blue;">Function</span> SendText(<span style="color:blue;">Optional</span> <span style="color:blue;">ByVal</span> Display_Text <span style="color:blue;">As</span> <span style="color:blue;">String</span> = <span style="color:#a31515;">&#8220;&#8221;</span>, <span style="color:blue;">Optional</span> <span style="color:blue;">ByVal</span> Personal_Text <span style="color:blue;">As</span> <span style="color:blue;">String</span> = <span style="color:#a31515;">&#8220;&#8221;</span>) <span style="color:blue;">As</span> <span style="color:blue;">Boolean</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;Create the Messenger API</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Dim</span> iMessenger <span style="color:blue;">As</span> MessengerAPI.Messenger</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>iMessenger = <span style="color:blue;">New</span> MessengerAPI.Messenger</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;Show the options window</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>iMessenger.OptionsPages(0, MessengerAPI.MOPTIONPAGE.MOPT_GENERAL_PAGE)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;Get the options windows handle</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Dim</span> handle <span style="color:blue;">As</span> IntPtr = FindMSN()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;This will keep looping until the window is found</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Do</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>handle = FindMSN()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Loop</span> <span style="color:blue;">Until</span> handle &lt;&gt; 0</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;Sleeps the thread while the options window loads</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>System.Threading.Thread.Sleep(60)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;i is our counter for which control we are on</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Dim</span> i <span style="color:blue;">As</span> <span style="color:blue;">Integer</span> = 0</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;Loop through each of the child windows</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">For</span> <span style="color:blue;">Each</span> child <span style="color:blue;">As</span> IntPtr <span style="color:blue;">In</span> GetChildWindows(handle)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;Gets the class name of the child</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Dim</span> sClassName <span style="color:blue;">As</span> <span style="color:blue;">New</span> System.Text.StringBuilder(<span style="color:#a31515;">&#8220;&#8221;</span>, 256)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Call</span> GetClassName(child, sClassName, 256)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;Converts it to a readable string</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Dim</span> x <span style="color:blue;">As</span> <span style="color:blue;">String</span> = sClassName.ToString</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;If its a textbox</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">If</span> x = <span style="color:#a31515;">&#8220;RichEdit20W&#8221;</span> <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>i += 1</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;If we are on the first control, the display name box</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">If</span> i = 1 <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;If display text is being changed</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">If</span> Display_Text &lt;&gt; <span style="color:#a31515;">&#8220;&#8221;</span> <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;Send the display text to the textbox</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Dim</span> sb <span style="color:blue;">As</span> <span style="color:blue;">New</span> System.Text.StringBuilder(Display_Text)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>SendMessage(child, WM_SETTEXT, 0, sb)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>SendMessage(child, WM_CHAR, 13, 1)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;If we are on the second control, the personal message box</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">ElseIf</span> i = 2 <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;If we are changing the personal text</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">If</span> Personal_Text &lt;&gt; <span style="color:#a31515;">&#8220;&#8221;</span> <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;Send the personal message text to the textbox</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Dim</span> sb <span style="color:blue;">As</span> <span style="color:blue;">New</span> System.Text.StringBuilder(Personal_Text)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span> </span>SendMessage(child, WM_SETTEXT, 0, sb)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>SendMessage(child, WM_CHAR, 13, 1)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;If the child control is the &#8220;OK&#8221; button</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">ElseIf</span> GetText(child) = <span style="color:#a31515;">&#8220;OK&#8221;</span> <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;Focus the button</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>SendMessage(child, WM_SETFOCUS, 0, 0)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;Press the Space button, to save changes</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>SendMessage(child, WM_KEYDOWN, &amp;H20, 390001)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>SendMessage(child, WM_CHAR, &amp;H63, 11101)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>SendMessage(child, WM_KEYUP, &amp;H20, 390001)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Next</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Function</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Sub</span> Form1_Load(<span style="color:blue;">ByVal</span> sender <span style="color:blue;">As</span> System.Object, <span style="color:blue;">ByVal</span> e <span style="color:blue;">As</span> System.EventArgs) <span style="color:blue;">Handles</span> <span style="color:blue;">MyBase</span>.Load</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;Create the Messenger API</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Dim</span> oMessenger <span style="color:blue;">As</span> MessengerAPI.Messenger</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>oMessenger = <span style="color:blue;">New</span> MessengerAPI.Messenger</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;Set the status to offline</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_INVISIBLE</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;Change name</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>SendText(<span style="color:#a31515;">&#8220;Mine&#8221;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;Sleep the thread</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>System.Threading.Thread.Sleep(700)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;Set status to online</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_ONLINE</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;Repeat</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_INVISIBLE</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>SendText(<span style="color:#a31515;">&#8220;beats&#8221;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>System.Threading.Thread.Sleep(700)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_ONLINE</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_INVISIBLE</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>SendText(<span style="color:#a31515;">&#8220;yours&#8221;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>System.Threading.Thread.Sleep(700)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_ONLINE</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_INVISIBLE</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>SendText(<span style="color:#a31515;">&#8220;cyb3r&#8221;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>System.Threading.Thread.Sleep(700)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_ONLINE</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_INVISIBLE</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>SendText(<span style="color:#a31515;">&#8220;d3m0n&#8221;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>System.Threading.Thread.Sleep(700)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span> </span>oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_ONLINE</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Sub</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;">End</span><span style="font-size:10pt;"> <span style="color:blue;">Class</span></span></p>
<p class="MsoNoSpacing">
<p class="MsoNoSpacing">You might want to make a function that automates the repeating</p>
<p class="MsoNoSpacing">
<p class="MsoNoSpacing">
<p>Imports System.Runtime.InteropServices<br />
Public Class Form1</p>
<p>&#8221;API<br />
&lt;DllImport(&#8220;User32.dll&#8221;)&gt; Private Shared Function EnumChildWindows(ByVal WindowHandle As IntPtr, ByVal Callback As EnumWindowProcess, ByVal lParam As IntPtr) As Boolean<br />
End Function<br />
&lt;DllImport(&#8220;user32.dll&#8221;, CharSet:=CharSet.Auto)&gt; Private Shared Sub GetClassName(ByVal hWnd As System.IntPtr, ByVal lpClassName As System.Text.StringBuilder, ByVal nMaxCount As Integer)<br />
End Sub<br />
&lt;DllImport(&#8220;user32.dll&#8221;, SetLastError:=True, CharSet:=CharSet.Auto)&gt; Private Shared Function GetWindowText(ByVal hwnd As IntPtr, ByVal lpString As System.Text.StringBuilder, ByVal cch As Integer) As Integer<br />
End Function<br />
&lt;DllImport(&#8220;user32.dll&#8221;, SetLastError:=True, CharSet:=CharSet.Auto)&gt; Private Shared Function GetWindowTextLength(ByVal hwnd As IntPtr) As Integer<br />
End Function</p>
<p>Private Declare Auto Function SendMessage Lib &#8220;user32&#8243; (ByVal hwnd As IntPtr, ByVal wMsg As Integer, ByVal wparam As Integer, ByVal lparam As System.Text.StringBuilder) As IntPtr<br />
Private Declare Auto Function SendMessage Lib &#8220;user32&#8243; (ByVal hWnd As IntPtr, ByVal msg As Integer, ByVal wParam As IntPtr, ByVal lParam As String) As IntPtr<br />
Private Declare Auto Function FindWindow Lib &#8220;user32&#8243; (ByVal lpClassName As String, ByVal lpWindowName As String) As IntPtr</p>
<p>&#8221;API Functions<br />
Private Shared Function GetChildWindows(ByVal ParentHandle As IntPtr) As IntPtr()<br />
Dim ChildrenList As New List(Of IntPtr)<br />
Dim ListHandle As GCHandle = GCHandle.Alloc(ChildrenList)<br />
Try<br />
EnumChildWindows(ParentHandle, AddressOf EnumWindow, GCHandle.ToIntPtr(ListHandle))<br />
Finally<br />
If ListHandle.IsAllocated Then ListHandle.Free()<br />
End Try<br />
Return ChildrenList.ToArray<br />
End Function<br />
Private Shared Function EnumWindow(ByVal Handle As IntPtr, ByVal Parameter As IntPtr) As Boolean<br />
Dim ChildrenList As List(Of IntPtr) = GCHandle.FromIntPtr(Parameter).Target<br />
If ChildrenList Is Nothing Then Throw New Exception(&#8220;GCHandle Target could not be cast as List(Of IntPtr)&#8221;)<br />
ChildrenList.Add(Handle)<br />
Return True<br />
End Function<br />
Public Shared Function GetText(ByVal hWnd As IntPtr) As String<br />
Dim length As Integer<br />
If hWnd.ToInt32 &lt;= 0 Then<br />
Return Nothing<br />
End If<br />
length = GetWindowTextLength(hWnd)<br />
If length = 0 Then<br />
Return Nothing<br />
End If<br />
Dim sb As New System.Text.StringBuilder(&#8220;&#8221;, length + 1)<br />
GetWindowText(hWnd, sb, sb.Capacity)<br />
Return sb.ToString()<br />
End Function</p>
<p>&#8221;Constants<br />
Private Const WM_SETTEXT = &amp;HC<br />
Private Const WM_CHAR = &amp;H102<br />
Private Const WM_KEYDOWN = &amp;H100<br />
Private Const WM_KEYUP = &amp;H101<br />
Private Const WM_SETFOCUS = &amp;H7</p>
<p>&#8221;Window Enum Delegate<br />
Private Delegate Function EnumWindowProcess(ByVal Handle As IntPtr, ByVal Parameter As IntPtr) As Boolean</p>
<p>&#8221;This function finds the Handle for the MSN Options window<br />
Private Shared Function FindMSN() As IntPtr<br />
FindMSN = FindWindow(vbNullString, &#8220;Options&#8221;)<br />
End Function</p>
<p>&#8221;This function Sends the text to the Options window<br />
Public Shared Function SendText(Optional ByVal Display_Text As String = &#8220;&#8221;, Optional ByVal Personal_Text As String = &#8220;&#8221;) As Boolean<br />
&#8221;Create the Messenger API<br />
Dim iMessenger As MessengerAPI.Messenger<br />
iMessenger = New MessengerAPI.Messenger<br />
&#8221;Show the options window<br />
iMessenger.OptionsPages(0, MessengerAPI.MOPTIONPAGE.MOPT_GENERAL_PAGE)<br />
&#8221;Get the options windows handle<br />
Dim handle As IntPtr = FindMSN()<br />
&#8221;This will keep looping until the window is found<br />
Do<br />
handle = FindMSN()<br />
Loop Until handle &lt;&gt; 0<br />
&#8221;Sleeps the thread while the options window loads<br />
System.Threading.Thread.Sleep(60)<br />
&#8221;i is our counter for which control we are on<br />
Dim i As Integer = 0<br />
&#8221;Loop through each of the child windows<br />
For Each child As IntPtr In GetChildWindows(handle)<br />
&#8221;Gets the class name of the child<br />
Dim sClassName As New System.Text.StringBuilder(&#8220;&#8221;, 256)<br />
Call GetClassName(child, sClassName, 256)<br />
&#8221;Converts it to a readable string<br />
Dim x As String = sClassName.ToString<br />
&#8221;If its a textbox<br />
If x = &#8220;RichEdit20W&#8221; Then<br />
i += 1<br />
&#8221;If we are on the first control, the display name box<br />
If i = 1 Then<br />
&#8221;If display text is being changed<br />
If Display_Text &lt;&gt; &#8220;&#8221; Then<br />
&#8221;Send the display text to the textbox<br />
Dim sb As New System.Text.StringBuilder(Display_Text)<br />
SendMessage(child, WM_SETTEXT, 0, sb)<br />
SendMessage(child, WM_CHAR, 13, 1)<br />
End If<br />
&#8221;If we are on the second control, the personal message box<br />
ElseIf i = 2 Then<br />
&#8221;If we are changing the personal text<br />
If Personal_Text &lt;&gt; &#8220;&#8221; Then<br />
&#8221;Send the personal message text to the textbox<br />
Dim sb As New System.Text.StringBuilder(Personal_Text)<br />
SendMessage(child, WM_SETTEXT, 0, sb)<br />
SendMessage(child, WM_CHAR, 13, 1)<br />
End If<br />
End If<br />
&#8221;If the child control is the &#8220;OK&#8221; button<br />
ElseIf GetText(child) = &#8220;OK&#8221; Then<br />
&#8221;Focus the button<br />
SendMessage(child, WM_SETFOCUS, 0, 0)<br />
&#8221;Press the Space button, to save changes<br />
SendMessage(child, WM_KEYDOWN, &amp;H20, 390001)<br />
SendMessage(child, WM_CHAR, &amp;H63, 11101)<br />
SendMessage(child, WM_KEYUP, &amp;H20, 390001)<br />
End If<br />
Next<br />
End Function</p>
<p>Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
&#8221;Create the Messenger API<br />
Dim oMessenger As MessengerAPI.Messenger<br />
oMessenger = New MessengerAPI.Messenger<br />
&#8221;Set the status to offline<br />
oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_INVISIBLE<br />
&#8221;Change name<br />
SendText(&#8220;Mine&#8221;)<br />
&#8221;Sleep the thread<br />
System.Threading.Thread.Sleep(700)<br />
&#8221;Set status to online<br />
oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_ONLINE</p>
<p>&#8221;Repeat<br />
oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_INVISIBLE<br />
SendText(&#8220;beats&#8221;)<br />
System.Threading.Thread.Sleep(700)<br />
oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_ONLINE<br />
oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_INVISIBLE<br />
SendText(&#8220;yours&#8221;)<br />
System.Threading.Thread.Sleep(700)<br />
oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_ONLINE<br />
oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_INVISIBLE<br />
SendText(&#8220;cyb3r&#8221;)<br />
System.Threading.Thread.Sleep(700)<br />
oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_ONLINE<br />
oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_INVISIBLE<br />
SendText(&#8220;d3m0n&#8221;)<br />
System.Threading.Thread.Sleep(700)<br />
oMessenger.MyStatus = MessengerAPI.MISTATUS.MISTATUS_ONLINE<br />
End Sub<br />
End Class</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ih4x.wordpress.com/43/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ih4x.wordpress.com/43/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ih4x.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ih4x.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ih4x.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ih4x.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ih4x.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ih4x.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ih4x.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ih4x.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ih4x.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ih4x.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ih4x.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ih4x.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ih4x.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ih4x.wordpress.com/43/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ih4x.wordpress.com&amp;blog=3140361&amp;post=43&amp;subd=ih4x&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ih4x.wordpress.com/2008/05/18/vb-net-change-msn-name/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/810cb4ebed3e0db0c0d9777516931db0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sim0n</media:title>
		</media:content>
	</item>
		<item>
		<title>Vb Net &#8211; Adding extensions to explorers context menu</title>
		<link>http://ih4x.wordpress.com/2008/05/11/vb-net-adding-extensions-to-explorers-context-menu/</link>
		<comments>http://ih4x.wordpress.com/2008/05/11/vb-net-adding-extensions-to-explorers-context-menu/#comments</comments>
		<pubDate>Sun, 11 May 2008 12:43:55 +0000</pubDate>
		<dc:creator>sim0n</dc:creator>
				<category><![CDATA[VB.net]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[customise]]></category>
		<category><![CDATA[explorer]]></category>
		<category><![CDATA[Registry]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://ih4x.wordpress.com/2008/05/11/vb-net-adding-extensions-to-explorers-context-menu/</guid>
		<description><![CDATA[Adding extensions to explorers context menu This program will add a menu to a specific files explorer context menu. I’ve never seen a good piece of source code to do this with, so here is a nice basic example which can be modified to do what you wish: Private Sub Form1_Load(ByVal sender As System.Object, ByVal [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ih4x.wordpress.com&amp;blog=3140361&amp;post=42&amp;subd=ih4x&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="MsoNoSpacing">Adding extensions to explorers context menu</p>
<p class="MsoNoSpacing">
<p class="MsoNoSpacing">This program will add a menu to a specific files explorer context menu.</p>
<p class="MsoNoSpacing">I’ve never seen a good piece of source code to do this with, so here is a nice basic example which can be modified to do what you wish:</p>
<p class="MsoNoSpacing">
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Sub</span> Form1_Load(<span style="color:blue;">ByVal</span> sender <span style="color:blue;">As</span> System.Object, <span style="color:blue;">ByVal</span> e <span style="color:blue;">As</span> System.EventArgs) <span style="color:blue;">Handles</span> <span style="color:blue;">MyBase</span>.Load</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Dim</span> RegKey <span style="color:blue;">As</span> <span style="color:blue;">String</span> = <span style="color:maroon;">&#8220;ShockwaveFlash.ShockwaveFlash\shell\Open With AE H-Studio\command&#8221;</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Try</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">If</span> Registry.ClassesRoot.OpenSubKey(RegKey).GetValue(<span style="color:maroon;">&#8220;&#8221;</span>) = <span style="color:maroon;">&#8220;&#8221;</span> <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;If the key exists but is blank, creates the subkey</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>Registry.ClassesRoot.CreateSubKey(RegKey).SetValue(<span style="color:maroon;">&#8220;&#8221;</span>, (ControlChars.Quote &amp; Application.ExecutablePath &amp; ControlChars.Quote &amp; <span style="color:maroon;">&#8221; %1&#8243;</span>))</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>MessageBox.Show(<span style="color:maroon;">&#8220;Explorer Context Entry Added for .swf Files&#8221;</span>, <span style="color:maroon;">&#8220;Registry entry added:&#8221;</span>, MessageBoxButtons.OK, MessageBoxIcon.Asterisk)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Exit</span> <span style="color:blue;">Sub</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>Application.Exit()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Catch</span> ex <span style="color:blue;">As</span> Exception</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;If the key does not exist at all, OpenSubKey will error (No object refrence) and this will create the key</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>Registry.ClassesRoot.CreateSubKey(RegKey).SetValue(<span style="color:maroon;">&#8220;&#8221;</span>, (ControlChars.Quote &amp; Application.ExecutablePath &amp; ControlChars.Quote &amp; <span style="color:maroon;">&#8221; %1&#8243;</span>))</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>MessageBox.Show(<span style="color:maroon;">&#8220;Explorer Context Entry Added for .swf Files&#8221;</span>, <span style="color:maroon;">&#8220;Registry entry added:&#8221;</span>, MessageBoxButtons.OK, MessageBoxIcon.Asterisk)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Exit</span> <span style="color:blue;">Sub</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>Application.Exit()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Try</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Sub</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;">
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"> </span></p>
<p class="MsoNoSpacing"><span>Then, you have to add in the actual code that checks which file is being selected:</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">If</span> Command() = <span style="color:maroon;">&#8220;&#8221;</span> <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;If there is no command parameters, exit program</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>Application.Exit()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Exit</span> <span style="color:blue;">Sub</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;This gets the fileinfo for the selected file, and calls the LoadSWF Function</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Dim</span> _file <span style="color:blue;">As</span> <span style="color:blue;">New</span> FileInfo(Interaction.Command)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>LoadSWF(_file.FullName)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>Application.Exit()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;">
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"> </span></p>
<p class="MsoNoSpacing"><span>That can be placed in the Form Load even too, and it calls the sub LoadSWF (the selected file)</span></p>
<p class="MsoNoSpacing">
<p class="MsoNoSpacing"><span> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:blue;">Public</span> <span style="color:blue;">Sub</span> LoadSWF(<span style="color:blue;">ByVal</span> _path <span style="color:blue;">As</span> <span style="color:blue;">String</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;This is where you would add in your code to handle the file loading.</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span><span style="color:green;">&#8221;Currently it just creates a message box with the files name</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"><span> </span>MessageBox.Show(<span style="color:maroon;">&#8220;Loaded File: &#8220;</span> &amp; _path, <span style="color:maroon;">&#8220;Success:&#8221;</span>, MessageBoxButtons.OK, MessageBoxIcon.Asterisk)</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Sub</span></span></p>
<p class="MsoNoSpacing">
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;"> </span></p>
<p class="MsoNoSpacing"><span>As you can see, its not that hard, and the code would be very easy to modify.</span></p>
<p class="MsoNoSpacing"><span>For example, to add a shell extension for a .exe file change RegKey to:</span></p>
<p class="MsoNoSpacing">
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;">Dim</span><span style="font-size:10pt;"> RegKey <span style="color:blue;">As</span> <span style="color:blue;">String</span> = <span style="color:maroon;">&#8220;exefile\shell\Open With Program Name\command&#8221;</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;">
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;">
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ih4x.wordpress.com/42/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ih4x.wordpress.com/42/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ih4x.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ih4x.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ih4x.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ih4x.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ih4x.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ih4x.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ih4x.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ih4x.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ih4x.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ih4x.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ih4x.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ih4x.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ih4x.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ih4x.wordpress.com/42/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ih4x.wordpress.com&amp;blog=3140361&amp;post=42&amp;subd=ih4x&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ih4x.wordpress.com/2008/05/11/vb-net-adding-extensions-to-explorers-context-menu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/810cb4ebed3e0db0c0d9777516931db0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sim0n</media:title>
		</media:content>
	</item>
		<item>
		<title>Vb Net &#8211; Low Level Mouse Hook (Global)</title>
		<link>http://ih4x.wordpress.com/2008/05/05/vb-net-low-level-mouse-hook-global/</link>
		<comments>http://ih4x.wordpress.com/2008/05/05/vb-net-low-level-mouse-hook-global/#comments</comments>
		<pubDate>Mon, 05 May 2008 19:07:29 +0000</pubDate>
		<dc:creator>sim0n</dc:creator>
				<category><![CDATA[VB.net]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[global]]></category>
		<category><![CDATA[Hook]]></category>
		<category><![CDATA[low level]]></category>
		<category><![CDATA[Mouse]]></category>

		<guid isPermaLink="false">http://ih4x.wordpress.com/2008/05/05/vb-net-low-level-mouse-hook-global/</guid>
		<description><![CDATA[This blog has moved New location: http://sim0n.wordpress.com/ Posts matching query: [VB.Net] Mouse Hook Class [VB.Net] Keyboard Hook Class<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ih4x.wordpress.com&amp;blog=3140361&amp;post=41&amp;subd=ih4x&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:center;"><strong>This blog has moved</strong><br />
New location: <a href="http://sim0n.wordpress.com/">http://sim0n.wordpress.com/</a></p>
<p style="text-align:center;">Posts matching query:<br />
<a href="http://sim0n.wordpress.com/2009/03/28/vbnet-mouse-hook-class/">[VB.Net] Mouse Hook Class</a><br />
<a href="http://sim0n.wordpress.com/2009/03/28/vbnet-keyboard-hook-class/">[VB.Net] Keyboard Hook Class</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ih4x.wordpress.com/41/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ih4x.wordpress.com/41/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ih4x.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ih4x.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ih4x.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ih4x.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ih4x.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ih4x.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ih4x.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ih4x.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ih4x.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ih4x.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ih4x.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ih4x.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ih4x.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ih4x.wordpress.com/41/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ih4x.wordpress.com&amp;blog=3140361&amp;post=41&amp;subd=ih4x&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ih4x.wordpress.com/2008/05/05/vb-net-low-level-mouse-hook-global/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/810cb4ebed3e0db0c0d9777516931db0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sim0n</media:title>
		</media:content>
	</item>
		<item>
		<title>Vb Net &#8211; Low Level Keyboard Hook (Global)</title>
		<link>http://ih4x.wordpress.com/2008/05/05/vb-net-low-level-keyboard-hook-global/</link>
		<comments>http://ih4x.wordpress.com/2008/05/05/vb-net-low-level-keyboard-hook-global/#comments</comments>
		<pubDate>Mon, 05 May 2008 15:52:18 +0000</pubDate>
		<dc:creator>sim0n</dc:creator>
				<category><![CDATA[VB.net]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[global]]></category>
		<category><![CDATA[Hook]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[low level]]></category>

		<guid isPermaLink="false">http://ih4x.wordpress.com/2008/05/05/vb-net-low-level-keyboard-hook-global/</guid>
		<description><![CDATA[This blog has moved New location: http://sim0n.wordpress.com/ Posts matching query: [VB.Net] Keyboard Hook Class [VB.Net] Mouse Hook Class<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ih4x.wordpress.com&amp;blog=3140361&amp;post=40&amp;subd=ih4x&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:center;"><strong>This blog has moved</strong><br />
New location: <a href="http://sim0n.wordpress.com/">http://sim0n.wordpress.com/</a></p>
<p style="text-align:center;">Posts matching query:<br />
<a href="http://sim0n.wordpress.com/2009/03/28/vbnet-keyboard-hook-class/">[VB.Net] Keyboard Hook Class</a><br />
<a href="http://sim0n.wordpress.com/2009/03/28/vbnet-mouse-hook-class/">[VB.Net] Mouse Hook Class</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ih4x.wordpress.com/40/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ih4x.wordpress.com/40/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ih4x.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ih4x.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ih4x.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ih4x.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ih4x.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ih4x.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ih4x.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ih4x.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ih4x.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ih4x.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ih4x.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ih4x.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ih4x.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ih4x.wordpress.com/40/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ih4x.wordpress.com&amp;blog=3140361&amp;post=40&amp;subd=ih4x&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ih4x.wordpress.com/2008/05/05/vb-net-low-level-keyboard-hook-global/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/810cb4ebed3e0db0c0d9777516931db0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sim0n</media:title>
		</media:content>
	</item>
		<item>
		<title>Vb Net Article &#8211; Medal of Honour Allied Assault Basic Hacks</title>
		<link>http://ih4x.wordpress.com/2008/05/04/vb-net-article-medal-of-honour-allied-assault-basic-hacks/</link>
		<comments>http://ih4x.wordpress.com/2008/05/04/vb-net-article-medal-of-honour-allied-assault-basic-hacks/#comments</comments>
		<pubDate>Sun, 04 May 2008 15:15:05 +0000</pubDate>
		<dc:creator>sim0n</dc:creator>
				<category><![CDATA[VB.net]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[cheat]]></category>
		<category><![CDATA[Console]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[HotKey]]></category>
		<category><![CDATA[Memory]]></category>
		<category><![CDATA[MoHAA]]></category>
		<category><![CDATA[Mouse]]></category>
		<category><![CDATA[Project]]></category>

		<guid isPermaLink="false">http://ih4x.wordpress.com/2008/05/04/vb-net-article-medal-of-honour-allied-assault-basic-hacks/</guid>
		<description><![CDATA[Medal of Honour Allied Assault Basic Hacks. I got bored a while back and made some basic hacks for MoHAA. I made a class (Well a few classes) that I used to read the console, send text to the console, and a few memory hacks. I then stuck this into a global key hook and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ih4x.wordpress.com&amp;blog=3140361&amp;post=39&amp;subd=ih4x&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="MsoNoSpacing">Medal of Honour Allied Assault Basic Hacks.</p>
<p class="MsoNoSpacing">
<p class="MsoNoSpacing">I got bored a while back and made some basic hacks for MoHAA.</p>
<p class="MsoNoSpacing">I made a class (Well a few classes) that I used to read the console, send text to the console, and a few memory hacks.</p>
<p class="MsoNoSpacing">I then stuck this into a global key hook and set up the hotkeys.</p>
<p class="MsoNoSpacing">
<p class="MsoNoSpacing">The classes are all contained inside <span style="font-size:10pt;font-family:&quot;color:blue;">Public</span><span style="font-size:10pt;font-family:&quot;"> <span style="color:blue;">Class</span> MoHFunctions</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Public</span> <span style="color:blue;">Class</span> WindowFunctions</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>&lt;DllImport(<span style="color:maroon;">&#8220;user32.dll&#8221;</span>, SetLastError:=<span style="color:blue;">True</span>, CharSet:=CharSet.Auto)&gt; <span style="color:blue;">Private</span> <span style="color:blue;">Shared</span> <span style="color:blue;">Function</span> ShowWindow(<span style="color:blue;">ByVal</span> hwnd <span style="color:blue;">As</span> IntPtr, <span style="color:blue;">ByVal</span> nCmdShow <span style="color:blue;">As</span> Int32) <span style="color:blue;">As</span> <span style="color:blue;">Boolean</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Function</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;color:blue;"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Enum</span> WindowShowStyle <span style="color:blue;">As</span> <span style="color:blue;">UInteger</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>Hide = 0</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>ShowMinimized = 2</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>Minimize = 6</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>ShowMinNoActivate = 7</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>ForceMinimized = 11</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Enum</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;color:blue;"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Declare</span> <span style="color:blue;">Auto</span> <span style="color:blue;">Function</span> FindWindow <span style="color:blue;">Lib</span> <span style="color:maroon;">&#8220;user32&#8243;</span> (<span style="color:blue;">ByVal</span> lpClassName <span style="color:blue;">As</span> <span style="color:blue;">String</span>, <span style="color:blue;">ByVal</span> lpWindowName <span style="color:blue;">As</span> <span style="color:blue;">String</span>) <span style="color:blue;">As</span> IntPtr</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Public</span> <span style="color:blue;">Shared</span> <span style="color:blue;">Sub</span> MinimiseWindow()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Dim</span> MoHWnd <span style="color:blue;">As</span> IntPtr = FindWindow(0, <span style="color:maroon;">&#8220;Medal of Honor Allied Assult&#8221;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>ShowWindow(MoHWnd, WindowShowStyle.Minimize)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Sub</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;color:blue;"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Class</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;color:blue;"> </span></p>
<p class="MsoNoSpacing">That class is basically for minimising the MoHAA Window, I never got round to adding anything else to it. Maybe one day…</p>
<p class="MsoNoSpacing">
<p class="MsoNoSpacing">Now for a long class, the console stuff.</p>
<p class="MsoNoSpacing">
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Public</span> <span style="color:blue;">Class</span> Console</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>&lt;DllImport(<span style="color:maroon;">&#8220;User32.dll&#8221;</span>)&gt; <span style="color:blue;">Private</span> <span style="color:blue;">Shared</span> <span style="color:blue;">Function</span> EnumChildWindows(<span style="color:blue;">ByVal</span> WindowHandle <span style="color:blue;">As</span> IntPtr, <span style="color:blue;">ByVal</span> Callback <span style="color:blue;">As</span> EnumWindowProcess, <span style="color:blue;">ByVal</span> lParam <span style="color:blue;">As</span> IntPtr) <span style="color:blue;">As</span> <span style="color:blue;">Boolean</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Function</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>&lt;DllImport(<span style="color:maroon;">&#8220;user32.dll&#8221;</span>, CharSet:=CharSet.Auto)&gt; <span style="color:blue;">Private</span> <span style="color:blue;">Shared</span> <span style="color:blue;">Sub</span> GetClassName(<span style="color:blue;">ByVal</span> hWnd <span style="color:blue;">As</span> System.IntPtr, <span style="color:blue;">ByVal</span> lpClassName <span style="color:blue;">As</span> System.Text.StringBuilder, <span style="color:blue;">ByVal</span> nMaxCount <span style="color:blue;">As</span> <span style="color:blue;">Integer</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Sub</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Shared</span> <span style="color:blue;">Function</span> GetChildWindows(<span style="color:blue;">ByVal</span> ParentHandle <span style="color:blue;">As</span> IntPtr) <span style="color:blue;">As</span> IntPtr()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Dim</span> ChildrenList <span style="color:blue;">As</span> <span style="color:blue;">New</span> List(<span style="color:blue;">Of</span> IntPtr)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Dim</span> ListHandle <span style="color:blue;">As</span> GCHandle = GCHandle.Alloc(ChildrenList)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Try</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>EnumChildWindows(ParentHandle, <span style="color:blue;">AddressOf</span> EnumWindow, GCHandle.ToIntPtr(ListHandle))</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Finally</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">If</span> ListHandle.IsAllocated <span style="color:blue;">Then</span> ListHandle.Free()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Try</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Return</span> ChildrenList.ToArray</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Function</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Shared</span> <span style="color:blue;">Function</span> EnumWindow(<span style="color:blue;">ByVal</span> Handle <span style="color:blue;">As</span> IntPtr, <span style="color:blue;">ByVal</span> Parameter <span style="color:blue;">As</span> IntPtr) <span style="color:blue;">As</span> <span style="color:blue;">Boolean</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Dim</span> ChildrenList <span style="color:blue;">As</span> List(<span style="color:blue;">Of</span> IntPtr) = GCHandle.FromIntPtr(Parameter).Target</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">If</span> ChildrenList <span style="color:blue;">Is</span> <span style="color:blue;">Nothing</span> <span style="color:blue;">Then</span> <span style="color:blue;">Throw</span> <span style="color:blue;">New</span> Exception(<span style="color:maroon;">&#8220;GCHandle Target could not be cast as List(Of IntPtr)&#8221;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>ChildrenList.Add(Handle)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Return</span> <span style="color:blue;">True</span></span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Function</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;color:blue;">Private</span><span style="font-size:10pt;font-family:&quot;"> <span style="color:blue;">Declare</span> <span style="color:blue;">Auto</span> <span style="color:blue;">Function</span> SendMessage <span style="color:blue;">Lib</span> <span style="color:maroon;">&#8220;user32&#8243;</span> (<span style="color:blue;">ByVal</span> hwnd <span style="color:blue;">As</span> IntPtr, <span style="color:blue;">ByVal</span> wMsg <span style="color:blue;">As</span> <span style="color:blue;">Integer</span>, <span style="color:blue;">ByVal</span> wparam <span style="color:blue;">As</span> <span style="color:blue;">Integer</span>, <span style="color:blue;">ByVal</span> lparam <span style="color:blue;">As</span> System.Text.StringBuilder) <span style="color:blue;">As</span> IntPtr</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Declare</span> <span style="color:blue;">Auto</span> <span style="color:blue;">Function</span> SendMessage <span style="color:blue;">Lib</span> <span style="color:maroon;">&#8220;user32&#8243;</span> (<span style="color:blue;">ByVal</span> hWnd <span style="color:blue;">As</span> IntPtr, <span style="color:blue;">ByVal</span> msg <span style="color:blue;">As</span> <span style="color:blue;">Integer</span>, <span style="color:blue;">ByVal</span> wParam <span style="color:blue;">As</span> IntPtr, <span style="color:blue;">ByVal</span> lParam <span style="color:blue;">As</span> <span style="color:blue;">String</span>) <span style="color:blue;">As</span> IntPtr</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Declare</span> <span style="color:blue;">Auto</span> <span style="color:blue;">Function</span> FindWindow <span style="color:blue;">Lib</span> <span style="color:maroon;">&#8220;user32&#8243;</span> (<span style="color:blue;">ByVal</span> lpClassName <span style="color:blue;">As</span> <span style="color:blue;">String</span>, <span style="color:blue;">ByVal</span> lpWindowName <span style="color:blue;">As</span> <span style="color:blue;">String</span>) <span style="color:blue;">As</span> IntPtr</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Delegate</span> <span style="color:blue;">Function</span> EnumWindowProcess(<span style="color:blue;">ByVal</span> Handle <span style="color:blue;">As</span> IntPtr, <span style="color:blue;">ByVal</span> Parameter <span style="color:blue;">As</span> IntPtr) <span style="color:blue;">As</span> <span style="color:blue;">Boolean</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;color:blue;"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Const</span> WM_GETTEXT = &amp;HD</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Const</span> WM_GETTEXTLENGTH <span style="color:blue;">As</span> <span style="color:blue;">Integer</span> = &amp;HE</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Const</span> WM_SETTEXT = &amp;HC</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Const</span> WM_CHAR = &amp;H102</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;color:blue;"> </span></p>
<p class="MsoNoSpacing">These functions are to get a list of the windows inside of the MoHAA console, and to get the text from it.</p>
<p class="MsoNoSpacing">
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Shared</span> <span style="color:blue;">Function</span> FindMoH() <span style="color:blue;">As</span> IntPtr</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>FindMoH = FindWindow(<span style="color:maroon;">&#8220;mohaa winconsole&#8221;</span>, vbNullString)</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Function</span></span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;color:blue;"> </span></p>
<p class="MsoNoSpacing">This function gets the window handle for the MoHAA console, which is then used to get the consoles edit controls handle.</p>
<p class="MsoNoSpacing">
<p class="MsoNoSpacing">Now, for the sending to the console:</p>
<p class="MsoNoSpacing">
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Public</span> <span style="color:blue;">Shared</span> <span style="color:blue;">Function</span> SendText(<span style="color:blue;">ByVal</span> Text <span style="color:blue;">As</span> <span style="color:blue;">String</span>) <span style="color:blue;">As</span> <span style="color:blue;">Boolean</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Dim</span> handle <span style="color:blue;">As</span> IntPtr = FindMoH()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">If</span> handle = 0 <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>MessageBox.Show(<span style="color:maroon;">&#8220;Medal of Honor Allied Assult Console not found.&#8221;</span>, <span style="color:maroon;">&#8220;Error:&#8221;</span>, MessageBoxButtons.OK, MessageBoxIcon.Error)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Return</span> <span style="color:maroon;">&#8220;Error;&#8221;</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Exit</span> <span style="color:blue;">Function</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">For</span> <span style="color:blue;">Each</span> child <span style="color:blue;">As</span> IntPtr <span style="color:blue;">In</span> GetChildWindows(handle)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Dim</span> sClassName <span style="color:blue;">As</span> <span style="color:blue;">New</span> System.Text.StringBuilder(<span style="color:maroon;">&#8220;&#8221;</span>, 256)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Call</span> GetClassName(child, sClassName, 256)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">If</span> sClassName.ToString = <span style="color:maroon;">&#8220;Edit&#8221;</span> <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Dim</span> sb <span style="color:blue;">As</span> <span style="color:blue;">New</span> System.Text.StringBuilder(Text)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>SendMessage(child, WM_SETTEXT, 0, sb)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>SendMessage(child, WM_CHAR, 13, 1)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Return</span> <span style="color:blue;">True</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Next</span></span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Function</span></span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;color:blue;"> </span></p>
<p class="MsoNoSpacing">This finds the Edit control by looping through the handles until if finds one with the class name “Edit”. It then uses <span style="font-size:10pt;font-family:&quot;">SendMessage</span> to set the text in the window, and then sends the Return character to the window to set it</p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;">(child, WM_CHAR, 13, 1)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"> </span></p>
<p class="MsoNoSpacing"><span>Reading text from the console isnt much different:</span></p>
<p class="MsoNoSpacing"><span> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;color:blue;">Public</span><span style="font-size:10pt;font-family:&quot;"> <span style="color:blue;">Shared</span> <span style="color:blue;">Function</span> ReadText() <span style="color:blue;">As</span> <span style="color:blue;">String</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>ReadText = <span style="color:maroon;">&#8220;&#8221;</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Dim</span> handle <span style="color:blue;">As</span> IntPtr = FindMoH()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">If</span> handle = 0 <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>MessageBox.Show(<span style="color:maroon;">&#8220;Medal of Honor Allied Assult Console not found.&#8221;</span>, <span style="color:maroon;">&#8220;Error:&#8221;</span>, MessageBoxButtons.OK, MessageBoxIcon.Error)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Return</span> <span style="color:maroon;">&#8220;Error;&#8221;</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Exit</span> <span style="color:blue;">Function</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">For</span> <span style="color:blue;">Each</span> child <span style="color:blue;">As</span> IntPtr <span style="color:blue;">In</span> GetChildWindows(handle)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Dim</span> sClassName <span style="color:blue;">As</span> <span style="color:blue;">New</span> System.Text.StringBuilder(<span style="color:maroon;">&#8220;&#8221;</span>, 256)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Call</span> GetClassName(child, sClassName, 256)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">If</span> sClassName.ToString = <span style="color:maroon;">&#8220;Edit&#8221;</span> <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Dim</span> conLength <span style="color:blue;">As</span> IntPtr</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>conLength = SendMessage(child, WM_GETTEXTLENGTH, IntPtr.Zero, IntPtr.Zero)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Dim</span> sbText <span style="color:blue;">As</span> <span style="color:blue;">New</span> System.Text.StringBuilder(conLength.ToInt32 + 1)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span> </span><span style="color:blue;">Dim</span> ptrRet <span style="color:blue;">As</span> IntPtr</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>ptrRet = SendMessage(child, WM_GETTEXT, conLength.ToInt32 + 1, sbText)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">If</span> <span style="color:blue;">Not</span> sbText.ToString = <span style="color:maroon;">&#8220;&#8221;</span> <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Return</span> sbText.ToString</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span> </span><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Next</span></span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Function</span></span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;color:blue;"> </span></p>
<p class="MsoNoSpacing"><span>This again loops through the handles, until it finds the edit control.</span></p>
<p class="MsoNoSpacing"><span>It then sends the </span><span style="font-size:10pt;font-family:&quot;">GETTEXTLENGTH</span> in order to get the length of the text in the console and then sends <span style="font-size:10pt;font-family:&quot;">GETTEXT</span> to the window to the length that was previously returned.</p>
<p class="MsoNoSpacing">It then builds the string; if it’s not blank then it returns the value.</p>
<p class="MsoNoSpacing">
<p class="MsoNoSpacing"><span>Now what can we actually do with these functions? Well to be honest, I didn’t use the </span><span style="font-size:10pt;font-family:&quot;">ReadText </span>function because I figured the only way to use it would be to check it on a loop, then if a specific string came up you could then do whatever, but I couldn’t be bothered with that…</p>
<p class="MsoNoSpacing">
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;color:blue;">Public</span><span style="font-size:10pt;font-family:&quot;"> <span style="color:blue;">Shared</span> <span style="color:blue;">Sub</span> SilentShot()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>SendText(<span style="color:maroon;">&#8220;echo Silent Shot&#8221;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>SendText(<span style="color:maroon;">&#8220;+attackprimary; weapdrop&#8221;</span>)</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;color:blue;">End</span><span style="font-size:10pt;font-family:&quot;"> <span style="color:blue;">Sub</span></span><span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;color:blue;">Public</span><span style="font-size:10pt;font-family:&quot;"> <span style="color:blue;">Shared</span> <span style="color:blue;">Sub</span> Time()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>SendText(<span style="color:maroon;">&#8220;echo &#8220;</span> &amp; Now.Hour &amp; <span style="color:maroon;">&#8220;:&#8221;</span> &amp; Now.Minute &amp; <span style="color:maroon;">&#8220;:&#8221;</span> &amp; Now.Second)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>SendText(<span style="color:maroon;">&#8220;locationprint 6 29 &#8220;</span> &amp; Now.Hour &amp; <span style="color:maroon;">&#8220;:&#8221;</span> &amp; Now.Minute &amp; <span style="color:maroon;">&#8220;:&#8221;</span> &amp; Now.Second)</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;color:blue;">End</span><span style="font-size:10pt;font-family:&quot;"> <span style="color:blue;">Sub</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;color:blue;">Public</span><span style="font-size:10pt;font-family:&quot;"> <span style="color:blue;">Shared</span> <span style="color:blue;">Sub</span> Connect(<span style="color:blue;">ByVal</span> Ip <span style="color:blue;">As</span> <span style="color:blue;">String</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>SendText(<span style="color:maroon;">&#8220;connect &#8220;</span> &amp; Ip)</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;color:blue;">End</span><span style="font-size:10pt;font-family:&quot;"> <span style="color:blue;">Sub</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;color:blue;">Public</span><span style="font-size:10pt;font-family:&quot;"> <span style="color:blue;">Shared</span> <span style="color:blue;">Sub</span> Specator()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>SendText(<span style="color:maroon;">&#8220;echo Gone Spectator&#8221;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>SendText(<span style="color:maroon;">&#8220;spectator&#8221;</span>)</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;color:blue;">End</span><span style="font-size:10pt;font-family:&quot;"> <span style="color:blue;">Sub</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;color:blue;">Public</span><span style="font-size:10pt;font-family:&quot;"> <span style="color:blue;">Shared</span> <span style="color:blue;">Sub</span> Reconnect()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>SendText(<span style="color:maroon;">&#8220;reconnect&#8221;</span>)</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;color:blue;">End</span><span style="font-size:10pt;font-family:&quot;"> <span style="color:blue;">Sub</span></span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;color:blue;"> </span></p>
<p class="MsoNoSpacing">Now, that’s just some basic stuff, but you could create some more advanced scripts such as:</p>
<p class="MsoNoSpacing">
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>SendText(<span style="color:maroon;">&#8220;+forward&#8221;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>System.Threading.Thread.Sleep(50)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>SendText(<span style="color:maroon;">&#8220;-forward&#8221;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>SendText(<span style="color:maroon;">&#8220;+moveup&#8221;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>System.Threading.Thread.Sleep(400)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>SendText(<span style="color:maroon;">&#8220;-moveup&#8221;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>System.Threading.Thread.Sleep(10)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>SendText(<span style="color:maroon;">&#8220;+forward&#8221;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>System.Threading.Thread.Sleep(20)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>SendText(<span style="color:maroon;">&#8220;+moveup&#8221;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>System.Threading.Thread.Sleep(200)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>SendText(<span style="color:maroon;">&#8220;-moveup&#8221;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>SendText(<span style="color:maroon;">&#8220;+forward&#8221;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>System.Threading.Thread.Sleep(200)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>SendText(<span style="color:maroon;">&#8220;+moveup&#8221;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>System.Threading.Thread.Sleep(100)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>SendText(<span style="color:maroon;">&#8220;-moveup&#8221;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>System.Threading.Thread.Sleep(20)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>SendText(<span style="color:maroon;">&#8220;+moveleft&#8221;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>SendText(<span style="color:maroon;">&#8220;-forward&#8221;</span>)</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;"><span> </span>SendText(<span style="color:maroon;">&#8220;-moveleft&#8221;</span>)</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;"> </span></p>
<p class="MsoNoSpacing">Now I just came up with that and gave it a quick test, so I can’t guarantee that it works every time (It was just a bind that I made and converted, and it was made quickly so there ARE errors)</p>
<p class="MsoNoSpacing">
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><em><span style="font-size:10pt;font-family:&quot;">bind 9 &#8220;+forward;wait 50;-forward;+moveup;say jumped;wait 400;-moveup;wait 10;+forward;say forward;wait 20;+moveup;say jumped;+wait 200; -moveup;+forward;wait 200; say jumped;+moveup; wait 100; -moveup;wait 20;+moveleft;-forward;-moveleft;-moveup&#8221;</span></em></p>
<p class="MsoNoSpacing">
<p class="MsoNoSpacing">For example, one noticeable error:<span> </span><span style="font-size:10pt;font-family:&quot;">say jumped;<strong><span style="background:red none repeat scroll 0;">+</span></strong>wait 200;</span></p>
<p class="MsoNoSpacing">
<p class="MsoNoSpacing">Now, off of the console stuff, and onto some fun stuff, memory editing!</p>
<p class="MsoNoSpacing">
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;color:blue;">Public</span><span style="font-size:10pt;font-family:&quot;"> <span style="color:blue;">Class</span> Memory</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>&lt;DllImport(<span style="color:maroon;">&#8220;kernel32.dll&#8221;</span>)&gt; <span style="color:blue;">Private</span> <span style="color:blue;">Shared</span> <span style="color:blue;">Function</span> WriteProcessMemory(<span style="color:blue;">ByVal</span> hProcess <span style="color:blue;">As</span> IntPtr, <span style="color:blue;">ByVal</span> lpBaseAddress <span style="color:blue;">As</span> IntPtr, <span style="color:blue;">ByVal</span> lpBuffer <span style="color:blue;">As</span> <span style="color:blue;">Byte</span>(), <span style="color:blue;">ByVal</span> nSize <span style="color:blue;">As</span> UIntPtr, &lt;Runtime.InteropServices.Out()&gt; <span style="color:blue;">ByRef</span> lpNumberOfBytesWritten <span style="color:blue;">As</span> IntPtr) <span style="color:blue;">As</span> <span style="color:blue;">Boolean</span></span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Function</span></span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;color:blue;"> </span></p>
<p class="MsoNoSpacing">My favourite API<span style="font-family:Wingdings;"><span>J</span></span>, well not really but what you gonna do?</p>
<p class="MsoNoSpacing">
<p class="MsoNoSpacing">So, anyway, in the main part of the program we have a variable named <span style="font-size:10pt;font-family:&quot;">MoHProchWnd</span>, that’s where I store MoHAA’s PiD using the sub below</p>
<p class="MsoNoSpacing">
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;color:blue;">Public</span><span style="font-size:10pt;font-family:&quot;"> <span style="color:blue;">Shared</span> <span style="color:blue;">Sub</span> onLoad()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Try</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Dim</span> Processes() <span style="color:blue;">As</span> System.Diagnostics.Process</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>Processes = System.Diagnostics.Process.GetProcessesByName(<span style="color:maroon;">&#8220;MOHAA&#8221;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>Main.MoHProchWnd = Processes(0).Handle</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Catch</span> ex <span style="color:blue;">As</span> Exception</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>Main.MoHProchWnd = 0</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Try</span></span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Sub</span></span></p>
<p class="MsoNoSpacing">
<p class="MsoNoSpacing">So, anyway below is a basic function for enabling cheats in MoHAA (“Cvars”)</p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;color:blue;"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;color:blue;">Public</span><span style="font-size:10pt;font-family:&quot;"> <span style="color:blue;">Shared</span> <span style="color:blue;">Sub</span> EnableCheats()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">If</span> Main.MoHProchWnd = 0 <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>onLoad()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Dim</span> bytes <span style="color:blue;">As</span> <span style="color:blue;">Byte</span>() = <span style="color:blue;">New</span> <span style="color:blue;">Byte</span>(0) {&amp;H86}</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>WriteProcessMemory(Main.MoHProchWnd, <span style="color:blue;">New</span> IntPtr(&amp;H44F999), bytes, <span style="color:blue;">New</span> UIntPtr(<span style="color:blue;">CType</span>(bytes.Length, UInt32)), <span style="color:blue;">New</span> IntPtr(0))</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>KeyHook.Cheats = <span style="color:blue;">True</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Sub</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;color:blue;"> </span></p>
<p class="MsoNoSpacing"><span>And then to disable them</span></p>
<p class="MsoNoSpacing"><span> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Public</span> <span style="color:blue;">Shared</span> <span style="color:blue;">Sub</span> DisableCheats()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">If</span> Main.MoHProchWnd = 0 <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>onLoad()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Dim</span> bytes <span style="color:blue;">As</span> <span style="color:blue;">Byte</span>() = <span style="color:blue;">New</span> <span style="color:blue;">Byte</span>(0) {&amp;H85}</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>WriteProcessMemory(Main.MoHProchWnd, <span style="color:blue;">New</span> IntPtr(&amp;H44F999), bytes, <span style="color:blue;">New</span> UIntPtr(<span style="color:blue;">CType</span>(bytes.Length, UInt32)), <span style="color:blue;">New</span> IntPtr(0))</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>KeyHook.Cheats = <span style="color:blue;">False</span></span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Sub</span></span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;color:blue;"> </span></p>
<p class="MsoNoSpacing">And a quick example of what else can be done:</p>
<p class="MsoNoSpacing">
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;color:blue;">Public</span><span style="font-size:10pt;font-family:&quot;"> <span style="color:blue;">Shared</span> <span style="color:blue;">Sub</span> EnableThirdPerson()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">If</span> Main.MoHProchWnd = 0 <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>onLoad()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Dim</span> bytes <span style="color:blue;">As</span> <span style="color:blue;">Byte</span>() = <span style="color:blue;">New</span> <span style="color:blue;">Byte</span>(0) {&amp;H1}</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>WriteProcessMemory(Main.MoHProchWnd, <span style="color:blue;">New</span> IntPtr(&amp;HECCAF0), bytes, <span style="color:blue;">New</span> UIntPtr(<span style="color:blue;">CType</span>(bytes.Length, UInt32)), <span style="color:blue;">New</span> IntPtr(0))</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span> </span>KeyHook.ThirdPerson = <span style="color:blue;">True</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>Console.SendText(<span style="color:maroon;">&#8220;cg_cameraverticaldisplacement -18&#8243;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>Console.SendText(<span style="color:maroon;">&#8220;echo 3rd Person Camera Position Fixed&#8221;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Sub</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Public</span> <span style="color:blue;">Shared</span> <span style="color:blue;">Sub</span> DisableThirdPerson()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">If</span> Main.MoHProchWnd = 0 <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>onLoad()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Dim</span> bytes <span style="color:blue;">As</span> <span style="color:blue;">Byte</span>() = <span style="color:blue;">New</span> <span style="color:blue;">Byte</span>(0) {&amp;H0}</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>WriteProcessMemory(Main.MoHProchWnd, <span style="color:blue;">New</span> IntPtr(&amp;HECCAF0), bytes, <span style="color:blue;">New</span> UIntPtr(<span style="color:blue;">CType</span>(bytes.Length, UInt32)), <span style="color:blue;">New</span> IntPtr(0))</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>KeyHook.ThirdPerson = <span style="color:blue;">False</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>Console.SendText(<span style="color:maroon;">&#8220;cg_cameraverticaldisplacement -2&#8243;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>Console.SendText(<span style="color:maroon;">&#8220;echo 1st Person Camera Position Fixed&#8221;</span>)</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Sub</span></span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;color:blue;"> </span></p>
<p class="MsoNoSpacing">That uses the console class to correct the camera position, and edits the programs memory to enable the third person – Note, that since it directly pokes an address, cheats do not need to be enabled to toggle 3<sup>rd</sup> person.</p>
<p class="MsoNoSpacing">
<p class="MsoNoSpacing">Now, onto the usage of these classes further. As I previously stated, I set this up on a global key hook. Below is the sub that I use to carry out the above functions.</p>
<p class="MsoNoSpacing">
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;color:blue;">Private</span><span style="font-size:10pt;font-family:&quot;"> <span style="color:blue;">Shared</span> <span style="color:blue;">Sub</span> KeyCheck()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">If</span> n0Down = <span style="color:blue;">True</span> <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">If</span> Cheats = <span style="color:blue;">True</span> <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>Cheats = <span style="color:blue;">False</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>Memory.DisableCheats()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Else</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>Cheats = <span style="color:blue;">True</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>Memory.EnableCheats()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span> </span><span style="color:blue;">ElseIf</span> n1Down = <span style="color:blue;">True</span> <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">If</span> ThirdPerson = <span style="color:blue;">True</span> <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>ThirdPerson = <span style="color:blue;">False</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>Memory.DisableThirdPerson()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Else</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>ThirdPerson = <span style="color:blue;">True</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>Memory.EnableThirdPerson()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">ElseIf</span> n2Down = <span style="color:blue;">True</span> <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>Console.SilentShot()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">ElseIf</span> n3Down = <span style="color:blue;">True</span> <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>Console.Specator()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">ElseIf</span> n4Down = <span style="color:blue;">True</span> <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>Console.Time()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">ElseIf</span> n5Down = <span style="color:blue;">True</span> <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>Console.Reconnect()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">ElseIf</span> n6Down = <span style="color:blue;">True</span> <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>Console.Connect(<span style="color:maroon;">&#8220;213.251.176.208:28305&#8243;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>Console.SendText(<span style="color:maroon;">&#8220;Echo Connecting to LCA V2 Sniper only&#8221;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span> </span>Console.SendText(<span style="color:maroon;">&#8220;Echo IP: 213.251.176.208:28305&#8243;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">Exit</span> <span style="color:blue;">Sub</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">ElseIf</span> n7Down = <span style="color:blue;">True</span> <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>Console.Connect(<span style="color:maroon;">&#8220;213.251.176.208:12000&#8243;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>Console.SendText(<span style="color:maroon;">&#8220;Echo Connecting to LCA Stalingrad Sniper only&#8221;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>Console.SendText(<span style="color:maroon;">&#8220;Echo IP: 213.251.176.208:12000&#8243;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">ElseIf</span> n8Down = <span style="color:blue;">True</span> <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>Console.Connect(<span style="color:maroon;">&#8220;217.79.181.142:27001&#8243;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>Console.SendText(<span style="color:maroon;">&#8220;Echo Connecting to [NAG] Stalingrad Sniper only 1&#8243;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span> </span>Console.SendText(<span style="color:maroon;">&#8220;Echo IP: 217.79.181.142:27001&#8243;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">ElseIf</span> n9Down = <span style="color:blue;">True</span> <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>Console.Connect(<span style="color:maroon;">&#8220;213.133.101.46:27001&#8243;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>Console.SendText(<span style="color:maroon;">&#8220;Echo Connecting to [NAG] Stalingrad Sniper only 2&#8243;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>Console.SendText(<span style="color:maroon;">&#8220;Echo IP: 213.133.101.46:27001&#8243;</span>)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">ElseIf</span> minusDown = <span style="color:blue;">True</span> <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span>WindowFunctions.MinimiseWindow()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Sub</span></span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;color:blue;"> </span></p>
<p class="MsoNoSpacing">As you can see, it just checks what key is down, and then if the specified one is, it carries out the function. n0 and n1 toggle the two memory functions by checking a Boolean to see if the function is enabled or not.</p>
<p class="MsoNoSpacing">
<p class="MsoNoSpacing">I was playing again earlier and thought about making a more accurate sniper rifle.</p>
<p class="MsoNoSpacing">I tried to just make a bind:</p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">bind MOUSE1 &#8220;+attacksecondary; +attackprimary; -attacksecondary&#8221;</span></p>
<p class="MsoNoSpacing">However, due to the way that MoHAA works, this would not carry out the zoom out function. So, I looked through the cmdlist, and found the zoomoff function, and made a new bind:</p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;">bind MOUSE1 &#8220;+attacksecondary; +attackprimary; zoomoff&#8221;</span></p>
<p class="MsoNoSpacing">Whilst this worked when playing on a local server, I tried it on another server and it did not work.</p>
<p class="MsoNoSpacing">
<p class="MsoNoSpacing">So now, I have not actually done this, but I would also hook the mouse, then if the mouse is clicked I would send these messages to console, after unbinding Mouse1 in game:</p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;"><span> </span>Console.SendText(<span style="color:maroon;">&#8220;+attacksecondary&#8221;</span>)</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;"><span> </span>Console.SendText(<span style="color:maroon;">&#8220;+attackprimary&#8221;</span>)<span style="color:maroon;"></span></span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;"><span> </span>Console.SendText(<span style="color:maroon;">&#8220;-attacksecondary&#8221;</span>)</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;"> </span></p>
<p class="MsoNoSpacing">But that however would do that for every single gun in the game, so I looked further for a console command that would give me the name of the gun currently in use. I searched both the cmdlist and the cvarslist, to no avail.</p>
<p class="MsoNoSpacing">I then went searching in the memory, and found a number of helpful addresses:</p>
<p class="MsoNoSpacing">010EEEF0 – Text[22] – The name of the gun as a string</p>
<p class="MsoNoSpacing">010EEF40 – 4 Bytes – The gun as an integer</p>
<p class="MsoNoSpacing">
I decided that the best way to do it would be using the integer, and then a list of values to see what gun is currently in use. I tested all the weapons and created this list</p>
<p class="MsoNoSpacing">
<p class="MsoNoSpacing">Value/Weapon</p>
<p class="MsoNoSpacing">1 &#8211; Papers</p>
<p class="MsoNoSpacing">2 &#8211; Colt 45</p>
<p class="MsoNoSpacing">3 &#8211; Walther P38</p>
<p class="MsoNoSpacing">4 &#8211; Hi Standard Silenced</p>
<p class="MsoNoSpacing">5 &#8211; M1 Garand</p>
<p class="MsoNoSpacing">6 &#8211; Mauser KAR 98K</p>
<p class="MsoNoSpacing">7 &#8211; KAR98 &#8211; Sniper</p>
<p class="MsoNoSpacing">8 &#8211; Springfield</p>
<p class="MsoNoSpacing">9 &#8211; Thompson</p>
<p class="MsoNoSpacing">10 &#8211; MP40</p>
<p class="MsoNoSpacing">11 &#8211; BAR</p>
<p class="MsoNoSpacing">12 &#8211; StG 44</p>
<p class="MsoNoSpacing">13 &#8211; Frag Grenade</p>
<p class="MsoNoSpacing">14 &#8211; Stielhandgranate</p>
<p class="MsoNoSpacing">15 &#8211; Bazooka</p>
<p class="MsoNoSpacing">16 – Panzerschreck</p>
<p class="MsoNoSpacing">
<p class="MsoNoSpacing">Now, I can read the memory at that address, and if the current weapon is either 7 or 8, it will send the zoom in, shoot, zoom out function for a 100% accurate shot.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ih4x.wordpress.com/39/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ih4x.wordpress.com/39/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ih4x.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ih4x.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ih4x.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ih4x.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ih4x.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ih4x.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ih4x.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ih4x.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ih4x.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ih4x.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ih4x.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ih4x.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ih4x.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ih4x.wordpress.com/39/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ih4x.wordpress.com&amp;blog=3140361&amp;post=39&amp;subd=ih4x&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ih4x.wordpress.com/2008/05/04/vb-net-article-medal-of-honour-allied-assault-basic-hacks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/810cb4ebed3e0db0c0d9777516931db0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sim0n</media:title>
		</media:content>
	</item>
		<item>
		<title>Release &#8211; Vb Net Windows Live Messenger Logger</title>
		<link>http://ih4x.wordpress.com/2008/05/03/release-vb-net-windows-live-messenger-logger/</link>
		<comments>http://ih4x.wordpress.com/2008/05/03/release-vb-net-windows-live-messenger-logger/#comments</comments>
		<pubDate>Sat, 03 May 2008 14:45:39 +0000</pubDate>
		<dc:creator>sim0n</dc:creator>
				<category><![CDATA[VB.net]]></category>

		<guid isPermaLink="false">http://ih4x.wordpress.com/2008/05/03/release-vb-net-windows-live-messenger-logger/</guid>
		<description><![CDATA[WLM/MSN Messenger Event Logger i__h4x MSN Event Logger program This little application sits in your system tray and logs the events that take place in your MSN/WLM Client. It logs all of the main events, such as Status changes, signing in and out, window creation, etc. The program then easily allows you to search the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ih4x.wordpress.com&amp;blog=3140361&amp;post=38&amp;subd=ih4x&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>WLM/MSN Messenger Event Logger</p>
<p>i__h4x MSN Event Logger program</p>
<p class="MsoNoSpacing">This little application sits in your system tray and logs the events that take place in your MSN/WLM Client.</p>
<p class="MsoNoSpacing">It logs all of the main events, such as Status changes, signing in and out, window creation, etc.</p>
<p class="MsoNoSpacing"><a href="http://ih4x.files.wordpress.com/2008/05/main.jpg"><img class="alignnone size-medium wp-image-34" src="http://ih4x.files.wordpress.com/2008/05/main.jpg?w=250&#038;h=300" alt="" width="250" height="300" /></a></p>
<p class="MsoNoSpacing">
<p class="MsoNoSpacing">The program then easily allows you to search the log for specific comments, such as peoples email addresses or status changes.</p>
<p class="MsoNoSpacing"><a href="http://ih4x.files.wordpress.com/2008/05/search.jpg"><img class="alignnone size-medium wp-image-35" src="http://ih4x.files.wordpress.com/2008/05/search.jpg?w=292&#038;h=300" alt="" width="292" height="300" /></a></p>
<p class="MsoNoSpacing">
<p class="MsoNoSpacing">You can save the logs, either save the entire log for the day or save your search results into a neatly formatted .Html log file.</p>
<p class="MsoNoSpacing"><a href="http://ih4x.files.wordpress.com/2008/05/saved.jpg"><img class="alignnone size-medium wp-image-36" src="http://ih4x.files.wordpress.com/2008/05/saved.jpg?w=300&#038;h=107" alt="" width="300" height="107" /></a></p>
<p class="MsoNoSpacing">
<p class="MsoNoSpacing">
<p class="MsoNoSpacing">Download Link:</p>
<p class="MsoNoSpacing"><a href="http://cid-50c4db1f234d8c02.skydrive.live.com/self.aspx/Public/WLM%20Logger/WLMLogger.zip">WLMLogger.zip</a></p>
<p class="MsoNoSpacing"><a href="http://cid-50c4db1f234d8c02.skydrive.live.com/self.aspx/Public/WLM%20Logger/WLMLogger.rar">WLMLogger.rar</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ih4x.wordpress.com/38/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ih4x.wordpress.com/38/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ih4x.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ih4x.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ih4x.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ih4x.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ih4x.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ih4x.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ih4x.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ih4x.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ih4x.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ih4x.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ih4x.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ih4x.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ih4x.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ih4x.wordpress.com/38/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ih4x.wordpress.com&amp;blog=3140361&amp;post=38&amp;subd=ih4x&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ih4x.wordpress.com/2008/05/03/release-vb-net-windows-live-messenger-logger/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/810cb4ebed3e0db0c0d9777516931db0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sim0n</media:title>
		</media:content>

		<media:content url="http://ih4x.files.wordpress.com/2008/05/main.jpg?w=250" medium="image" />

		<media:content url="http://ih4x.files.wordpress.com/2008/05/search.jpg?w=292" medium="image" />

		<media:content url="http://ih4x.files.wordpress.com/2008/05/saved.jpg?w=300" medium="image" />
	</item>
		<item>
		<title>VB Net &#8211; Mouse Macro Basics</title>
		<link>http://ih4x.wordpress.com/2008/05/03/vb-net-mouse-macro-basics/</link>
		<comments>http://ih4x.wordpress.com/2008/05/03/vb-net-mouse-macro-basics/#comments</comments>
		<pubDate>Sat, 03 May 2008 11:49:13 +0000</pubDate>
		<dc:creator>sim0n</dc:creator>
				<category><![CDATA[VB.net]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[HotKey]]></category>
		<category><![CDATA[macro]]></category>
		<category><![CDATA[Mouse]]></category>
		<category><![CDATA[pixel]]></category>
		<category><![CDATA[Project]]></category>
		<category><![CDATA[VB]]></category>

		<guid isPermaLink="false">http://ih4x.wordpress.com/2008/05/03/vb-net-mouse-macro-basics/</guid>
		<description><![CDATA[Got bored so I’ve decided that I&#8217;m going to make a little macro program, and ill post the updates here. Currently, I’ve got the basic structure and events working and I’ve tested it on a reactions tester to see how efficient it was. Currently, it’s started using a HotKey, and detects the message and starts [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ih4x.wordpress.com&amp;blog=3140361&amp;post=33&amp;subd=ih4x&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="MsoNoSpacing">Got bored so I’ve decided that I&#8217;m going to make a little macro program, and ill post the updates here.</p>
<p class="MsoNoSpacing">Currently, I’ve got the basic structure and events working and I’ve tested it on a reactions tester to see how efficient it was.</p>
<p class="MsoNoSpacing">
<p class="MsoNoSpacing">Currently, it’s started using a <a href="../2008/03/12/vb-net-global-hotkey/">HotKey</a>, and detects the message and starts a background worker.</p>
<p class="MsoNoSpacing">
<p class="MsoNoSpacing">
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;color:blue;">Protected</span><span style="font-size:9.5pt;font-family:&quot;"> <span style="color:blue;">Overrides</span> <span style="color:blue;">Sub</span> WndProc(<span style="color:blue;">ByRef</span> m <span style="color:blue;">As</span> System.Windows.Forms.Message)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">MyBase</span>.WndProc(m)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">If</span> m.Msg = WM_HOTKEY <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">If</span> BackgroundWorker1.IsBusy = <span style="color:blue;">False</span> <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span>BackgroundWorker1.RunWorkerAsync()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span>stops = <span style="color:blue;">False</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">Else</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span>stops = <span style="color:blue;">True</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">ElseIf</span> m.Msg = WM_QUERYENDSESSION <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span> </span>stops = <span style="color:blue;">True</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span>Application.Exit()</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p class="MsoNoSpacing"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Sub</span></span></p>
<p class="MsoNoSpacing">
<p class="MsoNoSpacing">The stops is a global Boolean and is in there as a separate way to end the macro’s loop, in case something has gone wrong. The first press of the HotKey starts the macro, the second ends it.</p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">ElseIf</span> m.Msg = WM_QUERYENDSESSION <span style="color:blue;">Then</span></span></p>
<p class="MsoNoSpacing">Is just in there if the message detected is the Windows Shutdown message, the application closes and ends the loop</p>
<p class="MsoNoSpacing">
<p class="MsoNoSpacing">Now, we have to look at how exactly we are going to create our mouse functions. Firstly, let’s look at the basic mouse click:</p>
<p class="MsoNoSpacing">
<p class="MsoNoSpacing">I&#8217;m carrying out this function using the <span style="font-size:10pt;font-family:&quot;">mouse_event library:</span></p>
<p class="MsoNoSpacing"><span style="font-size:9.5pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;color:blue;">Private</span><span style="font-size:9.5pt;font-family:&quot;"> <span style="color:blue;">Declare</span> <span style="color:blue;">Sub</span> mouse_event <span style="color:blue;">Lib</span> <span style="color:maroon;">&#8220;user32&#8243;</span> (<span style="color:blue;">ByVal</span> dwFlags <span style="color:blue;">As</span> <span style="color:blue;">Long</span>, <span style="color:blue;">ByVal</span> dx <span style="color:blue;">As</span> <span style="color:blue;">Long</span>, <span style="color:blue;">ByVal</span> dy <span style="color:blue;">As</span> <span style="color:blue;">Long</span>, <span style="color:blue;">ByVal</span> cButtons <span style="color:blue;">As</span> <span style="color:blue;">Long</span>, <span style="color:blue;">ByVal</span> dwExtraInfo <span style="color:blue;">As</span> <span style="color:blue;">Long</span>)</span></p>
<p class="MsoNoSpacing">
<p class="MsoNoSpacing">This is used with the below mouse event constants:</p>
<p class="MsoNoSpacing">
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">Const</span> MOUSEEVENTF_MOVE <span style="color:blue;">As</span> Int32 = &amp;H1</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">Const</span> MOUSEEVENTF_LEFTDOWN <span style="color:blue;">As</span> Int32 = &amp;H2</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">Const</span> MOUSEEVENTF_LEFTUP <span style="color:blue;">As</span> Int32 = &amp;H4</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">Const</span> MOUSEEVENTF_RIGHTDOWN <span style="color:blue;">As</span> Int32 = &amp;H8</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">Const</span> MOUSEEVENTF_RIGHTUP <span style="color:blue;">As</span> Int32 = &amp;H10</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">Const</span> MOUSEEVENTF_MIDDLEDOWN <span style="color:blue;">As</span> Int32 = &amp;H20</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">Const</span> MOUSEEVENTF_MIDDLEUP <span style="color:blue;">As</span> Int32 = &amp;H40</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">Const</span> MOUSEEVENTF_ABSOLUTE <span style="color:blue;">As</span> Int32 = &amp;H8000</span></p>
<p class="MsoNoSpacing"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">Const</span> MOUSEEVENTF_WHEEL <span style="color:blue;">As</span> Int32 = &amp;H800</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;"> </span></p>
<p class="MsoNoSpacing">For the sake of ease, we will only be using the dwFlags option of the mouse_events library, in order to peform a mouse click.</p>
<p class="MsoNoSpacing">
<p class="MsoNoSpacing">For a left mouse click:</p>
<p class="MsoNoSpacing"><span style="font-size:9.5pt;font-family:&quot;">mouse_event(MOUSEEVENTF_LEFTDOWN + MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)</span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;"> </span></p>
<p class="MsoNoSpacing">This will click the mouse at the cursors current location.</p>
<p class="MsoNoSpacing">
<p class="MsoNoSpacing">Next, we will look at moving the mouse to specified coordinates.</p>
<p class="MsoNoSpacing">This isn’t hard, you can either move the mouse using the <span style="font-size:10pt;font-family:&quot;">mouse_event </span>library or you can set the cursor location like this:</p>
<p class="MsoNoSpacing"><span style="font-size:9.5pt;font-family:&quot;"><span> </span>Windows.Forms.Cursor.Position = <span style="color:blue;">New</span> Point(700, 600)</span><span style="font-size:9.5pt;"></span></p>
<p class="MsoNoSpacing">This will move the mouse location to the specified point on the screen.</p>
<p class="MsoNoSpacing">
<p class="MsoNoSpacing">Next what we will look at is Pixel colour detection. This is done using the GetPixel and CreateDC API:</p>
<p class="MsoNoSpacing">
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span>&lt;Runtime.InteropServices.DllImport(<span style="color:maroon;">&#8220;gdi32.dll&#8221;</span>)&gt; <span style="color:blue;">Private</span> <span style="color:blue;">Shared</span> <span style="color:blue;">Function</span> GetPixel(<span style="color:blue;">ByVal</span> hdc <span style="color:blue;">As</span> IntPtr, <span style="color:blue;">ByVal</span> nXPos <span style="color:blue;">As</span> <span style="color:blue;">Integer</span>, <span style="color:blue;">ByVal</span> nYPos <span style="color:blue;">As</span> <span style="color:blue;">Integer</span>) <span style="color:blue;">As</span> <span style="color:blue;">Integer</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Function</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span>&lt;Runtime.InteropServices.DllImport(<span style="color:maroon;">&#8220;gdi32.dll&#8221;</span>)&gt; <span style="color:blue;">Private</span> <span style="color:blue;">Shared</span> <span style="color:blue;">Function</span> CreateDC(<span style="color:blue;">ByVal</span> lpszDriver <span style="color:blue;">As</span> <span style="color:blue;">String</span>, <span style="color:blue;">ByVal</span> lpszDevice <span style="color:blue;">As</span> <span style="color:blue;">String</span>, <span style="color:blue;">ByVal</span> lpszOutput <span style="color:blue;">As</span> <span style="color:blue;">String</span>, <span style="color:blue;">ByVal</span> lpInitData <span style="color:blue;">As</span> IntPtr) <span style="color:blue;">As</span> IntPtr</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Function</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span>&lt;Runtime.InteropServices.DllImport(<span style="color:maroon;">&#8220;gdi32.dll&#8221;</span>)&gt; <span style="color:blue;">Private</span> <span style="color:blue;">Shared</span> <span style="color:blue;">Function</span> DeleteDC(<span style="color:blue;">ByVal</span> hdc <span style="color:blue;">As</span> IntPtr) <span style="color:blue;">As</span> <span style="color:blue;">Boolean</span></span></p>
<p class="MsoNoSpacing"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Function</span></span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;color:blue;"> </span></p>
<p class="MsoNoSpacing"><span>We create a function in order to easily provide us with information on the pixel colour:</span></p>
<p class="MsoNoSpacing"><span> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Function</span> GetPixelColor(<span style="color:blue;">ByVal</span> x <span style="color:blue;">As</span> <span style="color:blue;">Integer</span>, <span style="color:blue;">ByVal</span> y <span style="color:blue;">As</span> <span style="color:blue;">Integer</span>) <span style="color:blue;">As</span> Color</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:green;">&#8221;This gets the pixel colour from the specified x/y coordinates</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">Dim</span> Scrn_hdc <span style="color:blue;">As</span> IntPtr = CreateDC(<span style="color:maroon;">&#8220;Display&#8221;</span>, <span style="color:blue;">Nothing</span>, <span style="color:blue;">Nothing</span>, IntPtr.Zero)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:green;">&#8221;Display being the name of the driver (Aka the screen display)</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">Dim</span> Colour <span style="color:blue;">As</span> <span style="color:blue;">Integer</span> = GetPixel(Scrn_hdc, x, y)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:green;">&#8221;Gets pixel information from this hdc</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span>DeleteDC(Scrn_hdc)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">Return</span> Color.FromArgb(Colour <span style="color:blue;">And</span> &amp;HFF, (Colour <span style="color:blue;">And</span> &amp;HFF00) &gt;&gt; 8, (Colour <span style="color:blue;">And</span> &amp;HFF0000) &gt;&gt; 16)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:green;">&#8221;Returns the colour value</span></span></p>
<p class="MsoNoSpacing"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Function</span></span></p>
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;"> </span></p>
<p class="MsoNoSpacing">We now have everything we need to create a basic pixel checker.</p>
<p class="MsoNoSpacing">Now, back to the Background Worker. This is where we will do the pixel checking, on a loop</p>
<p class="MsoNoSpacing">
<p class="MsoNoSpacing"><span style="font-size:10pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Sub</span> BackgroundWorker1_DoWork(<span style="color:blue;">ByVal</span> sender <span style="color:blue;">As</span> System.Object, <span style="color:blue;">ByVal</span> e <span style="color:blue;">As</span> System.ComponentModel.DoWorkEventArgs) <span style="color:blue;">Handles</span> BackgroundWorker1.DoWork</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;text-indent:36pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;color:blue;">Dim</span><span style="font-size:9.5pt;font-family:&quot;"> count <span style="color:blue;">As</span> <span style="color:blue;">Integer</span> = 0</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">Do</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">If</span> GetPixelColor(530, 540) &lt;&gt; Color.FromArgb(255, 255, 0, 0) <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:green;">&#8221;Waits for the colour at that point to change from Red</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span>Windows.Forms.Cursor.Position = <span style="color:blue;">New</span> Point(530, 540)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:green;">&#8221;Moves the mouse cursor</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span>mouse_event(MOUSEEVENTF_LEFTDOWN + MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:green;">&#8216; mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span> </span><span style="color:green;">&#8221;Clicks the mouse</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span>count += 1</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:green;">&#8221;Adds one to count</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span>Windows.Forms.Cursor.Position = <span style="color:blue;">New</span> Point(700, 600)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:green;">&#8221;Moves the mouse cursor out of the way</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span>System.Threading.Thread.Sleep(50)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:green;">&#8221;Sleeps the thread</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">If</span> count = 5 <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:green;">&#8221;If its done 5 clicks, it sets stops to true</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span>stops = <span style="color:blue;">True</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span>System.Threading.Thread.Sleep(1)</span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:green;">&#8221;Pause the loop</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">Loop</span> <span style="color:blue;">Until</span> stops = <span style="color:blue;">True</span> <span style="color:green;">&#8216;</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:green;">&#8216;Loop until stops is true, either set when count = 5 or externally</span></span></p>
<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal;"><span style="font-size:9.5pt;font-family:&quot;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Sub</span></span></p>
<p class="MsoNoSpacing"><span style="font-size:9.5pt;"> </span></p>
<p class="MsoNoSpacing"><span style="font-size:9.5pt;"> </span></p>
<p class="MsoNoSpacing">This is just a basic example. It checks the pixel colour at 530,540 and if it is not Red it moves the mouse to that location and clicks. It then moves the mouse off of that location and adds one to the loop.</p>
<p class="MsoNoSpacing">If the loop has been carried out 5 times, it then sets stops to true and the macro is stopped.</p>
<p class="MsoNoSpacing">
<p class="MsoNoSpacing">
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ih4x.wordpress.com/33/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ih4x.wordpress.com/33/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ih4x.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ih4x.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ih4x.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ih4x.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ih4x.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ih4x.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ih4x.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ih4x.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ih4x.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ih4x.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ih4x.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ih4x.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ih4x.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ih4x.wordpress.com/33/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ih4x.wordpress.com&amp;blog=3140361&amp;post=33&amp;subd=ih4x&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ih4x.wordpress.com/2008/05/03/vb-net-mouse-macro-basics/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/810cb4ebed3e0db0c0d9777516931db0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sim0n</media:title>
		</media:content>
	</item>
		<item>
		<title>VB Net &#8211; MSN Xfire Personal Message</title>
		<link>http://ih4x.wordpress.com/2008/04/27/vb-net-msn-xfire-personal-message/</link>
		<comments>http://ih4x.wordpress.com/2008/04/27/vb-net-msn-xfire-personal-message/#comments</comments>
		<pubDate>Sun, 27 Apr 2008 20:59:26 +0000</pubDate>
		<dc:creator>sim0n</dc:creator>
				<category><![CDATA[VB.net]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[MSN]]></category>
		<category><![CDATA[Project]]></category>
		<category><![CDATA[SendMessage]]></category>
		<category><![CDATA[VB]]></category>
		<category><![CDATA[Xfire]]></category>

		<guid isPermaLink="false">http://ih4x.wordpress.com/?p=32</guid>
		<description><![CDATA[Imports System.Runtime.InteropServices Public Class Form1 #Region &#8220;APIS+CONST&#8221; &#8221;Here are the API Functions needed &#60;DllImport(&#8220;User32.dll&#8221;)&#62; Private Shared Function EnumChildWindows(ByVal WindowHandle As IntPtr, ByVal Callback As EnumWindowProcess, ByVal lParam As IntPtr) As Boolean End Function &#60;DllImport(&#8220;user32.dll&#8221;, CharSet:=CharSet.Auto)&#62; Private Shared Sub GetClassName(ByVal hWnd As System.IntPtr, ByVal lpClassName As System.Text.StringBuilder, ByVal nMaxCount As Integer) End Sub Private Declare Auto [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ih4x.wordpress.com&amp;blog=3140361&amp;post=32&amp;subd=ih4x&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal"><span style="font-size:8pt;">Imports</span><span style="font-size:8pt;"> System.Runtime.InteropServices</span></p>
<p class="MsoNormal"><span style="font-size:8pt;">Public</span><span style="font-size:8pt;"> <span style="color:blue;">Class</span> Form1</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"> </span></p>
<p class="MsoNormal"><span style="font-size:8pt;">#<span style="color:blue;">Region</span> <span style="color:maroon;">&#8220;APIS+CONST&#8221;</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:green;">&#8221;Here are the API Functions needed</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span>&lt;DllImport(<span style="color:maroon;">&#8220;User32.dll&#8221;</span>)&gt; <span style="color:blue;">Private</span> <span style="color:blue;">Shared</span> <span style="color:blue;">Function</span> EnumChildWindows(<span style="color:blue;">ByVal</span> WindowHandle <span style="color:blue;">As</span> IntPtr, <span style="color:blue;">ByVal</span> Callback <span style="color:blue;">As</span> EnumWindowProcess, <span style="color:blue;">ByVal</span> lParam <span style="color:blue;">As</span> IntPtr) <span style="color:blue;">As</span> <span style="color:blue;">Boolean</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Function</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span>&lt;DllImport(<span style="color:maroon;">&#8220;user32.dll&#8221;</span>, CharSet:=CharSet.Auto)&gt; <span style="color:blue;">Private</span> <span style="color:blue;">Shared</span> <span style="color:blue;">Sub</span> GetClassName(<span style="color:blue;">ByVal</span> hWnd <span style="color:blue;">As</span> System.IntPtr, <span style="color:blue;">ByVal</span> lpClassName <span style="color:blue;">As</span> System.Text.StringBuilder, <span style="color:blue;">ByVal</span> nMaxCount <span style="color:blue;">As</span> <span style="color:blue;">Integer</span>)</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Sub</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Declare</span> <span style="color:blue;">Auto</span> <span style="color:blue;">Function</span> FindWindow <span style="color:blue;">Lib</span> <span style="color:maroon;">&#8220;user32&#8243;</span> (<span style="color:blue;">ByVal</span> lpClassName <span style="color:blue;">As</span> <span style="color:blue;">String</span>, <span style="color:blue;">ByVal</span> lpWindowName <span style="color:blue;">As</span> <span style="color:blue;">String</span>) <span style="color:blue;">As</span> IntPtr</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Declare</span> <span style="color:blue;">Auto</span> <span style="color:blue;">Function</span> SendMessage <span style="color:blue;">Lib</span> <span style="color:maroon;">&#8220;user32&#8243;</span> (<span style="color:blue;">ByVal</span> hwnd <span style="color:blue;">As</span> IntPtr, <span style="color:blue;">ByVal</span> wMsg <span style="color:blue;">As</span> <span style="color:blue;">Integer</span>, <span style="color:blue;">ByVal</span> wparam <span style="color:blue;">As</span> <span style="color:blue;">Integer</span>, <span style="color:blue;">ByVal</span> lparam <span style="color:blue;">As</span> System.Text.StringBuilder) <span style="color:blue;">As</span> IntPtr</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Declare</span> <span style="color:blue;">Auto</span> <span style="color:blue;">Function</span> SendMessage <span style="color:blue;">Lib</span> <span style="color:maroon;">&#8220;user32&#8243;</span> (<span style="color:blue;">ByVal</span> hWnd <span style="color:blue;">As</span> IntPtr, <span style="color:blue;">ByVal</span> msg <span style="color:blue;">As</span> <span style="color:blue;">Integer</span>, <span style="color:blue;">ByVal</span> wParam <span style="color:blue;">As</span> IntPtr, <span style="color:blue;">ByVal</span> lParam <span style="color:blue;">As</span> <span style="color:blue;">String</span>) <span style="color:blue;">As</span> IntPtr</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Declare</span> <span style="color:blue;">Function</span> SendMessage2 <span style="color:blue;">Lib</span> <span style="color:maroon;">&#8220;user32.dll&#8221;</span> <span style="color:blue;">Alias</span> <span style="color:maroon;">&#8220;SendMessageA&#8221;</span> (<span style="color:blue;">ByVal</span> hwnd <span style="color:blue;">As</span> Int32, <span style="color:blue;">ByVal</span> wMsg <span style="color:blue;">As</span> Int32, <span style="color:blue;">ByVal</span> wParam <span style="color:blue;">As</span> Int32, <span style="color:blue;">ByVal</span> lParam <span style="color:blue;">As</span> IntPtr) <span style="color:blue;">As</span> Int32</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Declare</span> <span style="color:blue;">Function</span> FindWindowEx <span style="color:blue;">Lib</span> <span style="color:maroon;">&#8220;user32.dll&#8221;</span> <span style="color:blue;">Alias</span> <span style="color:maroon;">&#8220;FindWindowExA&#8221;</span> (<span style="color:blue;">ByVal</span> hWnd1 <span style="color:blue;">As</span> Int32, <span style="color:blue;">ByVal</span> hWnd2 <span style="color:blue;">As</span> Int32, <span style="color:blue;">ByVal</span> lpsz1 <span style="color:blue;">As</span> <span style="color:blue;">String</span>, <span style="color:blue;">ByVal</span> lpsz2 <span style="color:blue;">As</span> <span style="color:blue;">String</span>) <span style="color:blue;">As</span> Int32</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Const</span> WM_GETTEXT = &amp;HD</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Const</span> WM_GETTEXTLENGTH <span style="color:blue;">As</span> <span style="color:blue;">Integer</span> = &amp;HE</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Const</span> WM_SETTEXT = &amp;HC</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Structure</span> COPYDATASTRUCT</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Public</span> dwData <span style="color:blue;">As</span> Int32</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Public</span> cbData <span style="color:blue;">As</span> Int32</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Public</span> lpData <span style="color:blue;">As</span> IntPtr</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Structure</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Const</span> WM_COPYDATA <span style="color:blue;">As</span> Int32 = &amp;H4A</span></p>
<p class="MsoNormal"><span style="font-size:8pt;">#<span style="color:blue;">End</span> <span style="color:blue;">Region</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"> </span></p>
<p class="MsoNormal"><span style="font-size:8pt;">#<span style="color:blue;">Region</span> <span style="color:maroon;">&#8220;Functions/Enums not to edit&#8221;</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Delegate</span> <span style="color:blue;">Function</span> EnumWindowProcess(<span style="color:blue;">ByVal</span> Handle <span style="color:blue;">As</span> IntPtr, <span style="color:blue;">ByVal</span> Parameter <span style="color:blue;">As</span> IntPtr) <span style="color:blue;">As</span> <span style="color:blue;">Boolean</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Enum</span> IconType</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span>Music</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span>Games</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span>Office</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Enum</span> <span style="color:green;">&#8221;This contains the values for the different MSN now playing icons</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Shared</span> <span style="color:blue;">Function</span> GetChildWindows(<span style="color:blue;">ByVal</span> ParentHandle <span style="color:blue;">As</span> IntPtr) <span style="color:blue;">As</span> IntPtr() <span style="color:green;">&#8221;Gets the list of child windows from the parent window</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Dim</span> ChildrenList <span style="color:blue;">As</span> <span style="color:blue;">New</span> List(<span style="color:blue;">Of</span> IntPtr)</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Dim</span> ListHandle <span style="color:blue;">As</span> GCHandle = GCHandle.Alloc(ChildrenList)</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Try</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span>EnumChildWindows(ParentHandle, <span style="color:blue;">AddressOf</span> EnumWindow, GCHandle.ToIntPtr(ListHandle)) <span style="color:green;">&#8221;Enumerates the windows</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Finally</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">If</span> ListHandle.IsAllocated <span style="color:blue;">Then</span> ListHandle.Free()</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Try</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Return</span> ChildrenList.ToArray <span style="color:green;">&#8221;Returns the list of windows as a collection on IntPrt, which is then searched in</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Function</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Shared</span> <span style="color:blue;">Function</span> EnumWindow(<span style="color:blue;">ByVal</span> Handle <span style="color:blue;">As</span> IntPtr, <span style="color:blue;">ByVal</span> Parameter <span style="color:blue;">As</span> IntPtr) <span style="color:blue;">As</span> <span style="color:blue;">Boolean</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Dim</span> ChildrenList <span style="color:blue;">As</span> List(<span style="color:blue;">Of</span> IntPtr) = GCHandle.FromIntPtr(Parameter).Target</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">If</span> ChildrenList <span style="color:blue;">Is</span> <span style="color:blue;">Nothing</span> <span style="color:blue;">Then</span> <span style="color:blue;">Throw</span> <span style="color:blue;">New</span> Exception(<span style="color:maroon;">&#8220;GCHandle Target could not be cast as List(Of IntPtr)&#8221;</span>)</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span>ChildrenList.Add(Handle) <span style="color:green;">&#8221;Adds a list of window handles</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Return</span> <span style="color:blue;">True</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Function</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Shared</span> <span style="color:blue;">Function</span> FindXfire() <span style="color:blue;">As</span> IntPtr</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span>FindXfire = FindWindow(<span style="color:maroon;">&#8220;SkinWnd&#8221;</span>, vbNullString) <span style="color:green;">&#8221;Finds handle of the Xfire class window</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Function</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Shared</span> <span style="color:blue;">Function</span> SendText(<span style="color:blue;">ByVal</span> Text <span style="color:blue;">As</span> <span style="color:blue;">String</span>) <span style="color:blue;">As</span> <span style="color:blue;">Boolean</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span>Shell(<span style="color:maroon;">&#8220;xfire:status?text=&#8221;</span> &amp; Text) <span style="color:green;">&#8221;Sets the Xfire status</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Function</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Shared</span> <span style="color:blue;">Function</span> ReadText() <span style="color:blue;">As</span> <span style="color:blue;">String</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span>ReadText = <span style="color:maroon;">&#8220;&#8221;</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Dim</span> handle <span style="color:blue;">As</span> IntPtr = FindXfire()</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">If</span> handle = 0 <span style="color:blue;">Then</span> <span style="color:green;">&#8221;If the window isnt found</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span>MessageBox.Show(<span style="color:maroon;">&#8220;Xfire window not found.&#8221;</span>, <span style="color:maroon;">&#8220;Error:&#8221;</span>, MessageBoxButtons.OK, MessageBoxIcon.Error)</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Return</span> <span style="color:maroon;">&#8220;Error;&#8221;</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Exit</span> <span style="color:blue;">Function</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">For</span> <span style="color:blue;">Each</span> child <span style="color:blue;">As</span> IntPtr <span style="color:blue;">In</span> GetChildWindows(handle) <span style="color:green;">&#8221;Loop through list of windows</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Dim</span> sClassName <span style="color:blue;">As</span> <span style="color:blue;">New</span> System.Text.StringBuilder(<span style="color:maroon;">&#8220;&#8221;</span>, 256)</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Call</span> GetClassName(child, sClassName, 256)</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">If</span> sClassName.ToString = <span style="color:maroon;">&#8220;Edit&#8221;</span> <span style="color:blue;">Then</span> <span style="color:green;">&#8221;Reads the class name of the handle</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Dim</span> conLength <span style="color:blue;">As</span> IntPtr</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span>conLength = SendMessage(child, WM_GETTEXTLENGTH, IntPtr.Zero, IntPtr.Zero) <span style="color:green;">&#8221;Gets the length of the text</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Dim</span> sbText <span style="color:blue;">As</span> <span style="color:blue;">New</span> System.Text.StringBuilder(conLength.ToInt32 + 1)</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Dim</span> ptrRet <span style="color:blue;">As</span> IntPtr</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span>ptrRet = SendMessage(child, WM_GETTEXT, conLength.ToInt32 + 1, sbText) <span style="color:green;">&#8221;Reads the text from the handle</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">If</span> <span style="color:blue;">Not</span> sbText.ToString = <span style="color:maroon;">&#8220;&#8221;</span> <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Return</span> sbText.ToString <span style="color:green;">&#8221;returns the text</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Next</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Function</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Shared</span> <span style="color:blue;">Sub</span> SetPlayingInfo(<span style="color:blue;">ByVal</span> Artist <span style="color:blue;">As</span> <span style="color:blue;">String</span>, <span style="color:blue;">ByVal</span> Album <span style="color:blue;">As</span> <span style="color:blue;">String</span>, <span style="color:blue;">ByVal</span> Title <span style="color:blue;">As</span> <span style="color:blue;">String</span>, <span style="color:blue;">Optional</span> <span style="color:blue;">ByVal</span> Icon <span style="color:blue;">As</span> IconType = IconType.Music, <span style="color:blue;">Optional</span> <span style="color:blue;">ByVal</span> WMContentID <span style="color:blue;">As</span> <span style="color:blue;">String</span> = vbNullString, <span style="color:blue;">Optional</span> <span style="color:blue;">ByVal</span> Format <span style="color:blue;">As</span> <span style="color:blue;">String</span> = <span style="color:maroon;">&#8220;{0} &#8211; {1}&#8221;</span>, <span style="color:blue;">Optional</span> <span style="color:blue;">ByVal</span> Show <span style="color:blue;">As</span> <span style="color:blue;">Boolean</span> = <span style="color:blue;">True</span>)</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:green;">&#8221;Not my function</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Dim</span> mess <span style="color:blue;">As</span> <span style="color:blue;">String</span> = <span style="color:blue;">String</span>.Format(<span style="color:maroon;">&#8220;{0}{1}{2}{3}{4}{5}{6}&#8221;</span> &amp; vbNullChar, Icon.ToString, Math.Abs(<span style="color:blue;">CInt</span>(Show)), Format, Artist, Title, Album, WMContentID)</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Dim</span> lpMess <span style="color:blue;">As</span> GCHandle = GCHandle.Alloc(mess, GCHandleType.Pinned)</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Dim</span> CD <span style="color:blue;">As</span> COPYDATASTRUCT</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">With</span> CD</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span>.dwData = &amp;H547</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span>.cbData = mess.Length * 2</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span>.lpData = lpMess.AddrOfPinnedObject</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">With</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Dim</span> lpCD <span style="color:blue;">As</span> GCHandle = GCHandle.Alloc(CD, GCHandleType.Pinned)</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Dim</span> hMSGRUI <span style="color:blue;">As</span> <span style="color:blue;">Integer</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Do</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span>hMSGRUI = FindWindowEx(0, hMSGRUI, <span style="color:maroon;">&#8220;MsnMsgrUIManager&#8221;</span>, vbNullString)</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">If</span> (hMSGRUI &gt; 0) <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span>SendMessage2(hMSGRUI, WM_COPYDATA, 0, lpCD.AddrOfPinnedObject)</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Loop</span> <span style="color:blue;">Until</span> (hMSGRUI = 0)</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span>lpMess.Free()</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span>lpCD.Free()</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Sub</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;">#<span style="color:blue;">End</span> <span style="color:blue;">Region</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"> </span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Private</span> Xfolder <span style="color:blue;">As</span> IO.FileSystemWatcher = <span style="color:blue;">New</span> System.IO.FileSystemWatcher()</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Private</span> work <span style="color:blue;">As</span> <span style="color:blue;">Boolean</span> = <span style="color:blue;">True</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"> </span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Sub</span> Form1_Load(<span style="color:blue;">ByVal</span> sender <span style="color:blue;">As</span> System.Object, <span style="color:blue;">ByVal</span> e <span style="color:blue;">As</span> System.EventArgs) <span style="color:blue;">Handles</span> <span style="color:blue;">MyBase</span>.Load</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Dim</span> path <span style="color:blue;">As</span> <span style="color:blue;">String</span> = <span style="color:blue;">My</span>.Computer.FileSystem.GetParentPath(<span style="color:blue;">My</span>.Computer.FileSystem.GetParentPath(<span style="color:blue;">My</span>.Computer.FileSystem.GetParentPath(<span style="color:blue;">My</span>.Computer.FileSystem.SpecialDirectories.CurrentUserApplicationData)))</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span>Xfolder.Path = path &amp; <span style="color:maroon;">&#8220;\Xfire&#8221;</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span>Xfolder.NotifyFilter = IO.NotifyFilters.Attributes</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">AddHandler</span> Xfolder.Changed, <span style="color:blue;">AddressOf</span> Changed <span style="color:green;">&#8221;Creates the fsw, to the sub Changed</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span>Xfolder.EnableRaisingEvents = <span style="color:blue;">True</span> <span style="color:green;">&#8221;Starts watching</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Sub</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"> </span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Sub</span> Changed(<span style="color:blue;">ByVal</span> source <span style="color:blue;">As</span> <span style="color:blue;">Object</span>, <span style="color:blue;">ByVal</span> e <span style="color:blue;">As</span> System.IO.FileSystemEventArgs)</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">If</span> e.Name = <span style="color:maroon;">&#8220;status.ini&#8221;</span> <span style="color:blue;">Then</span> <span style="color:green;">&#8221;If the modified file is status.ini</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Dim</span> Str <span style="color:blue;">As</span> <span style="color:blue;">String</span> = ReadText() <span style="color:green;">&#8221;reads the window text</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">If</span> <span style="color:blue;">Not</span> Str = <span style="color:maroon;">&#8220;Online&#8221;</span> <span style="color:blue;">Or</span> Str = <span style="color:maroon;">&#8220;(AFK) Away From Keyboard&#8221;</span> <span style="color:blue;">Then</span> <span style="color:green;">&#8221;if its not a default one</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span>SetPlayingInfo(<span style="color:maroon;">&#8220;Now Playing&#8221;</span>, <span style="color:maroon;">&#8220;i__h4x Logger&#8221;</span>, ReadText(), IconType.Games) <span style="color:green;">&#8221;Sets the msn pm to the game</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">If</span> BackgroundWorker1.IsBusy = <span style="color:blue;">False</span> <span style="color:blue;">Then</span> <span style="color:green;">&#8221;Starts the bgw which sets the personal message (Incase other programs change it)</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span>BackgroundWorker1.RunWorkerAsync()</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span>work = <span style="color:blue;">True</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Sub</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"> </span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Private</span> <span style="color:blue;">Sub</span> BackgroundWorker1_DoWork(<span style="color:blue;">ByVal</span> sender <span style="color:blue;">As</span> System.Object, <span style="color:blue;">ByVal</span> e <span style="color:blue;">As</span> System.ComponentModel.DoWorkEventArgs) <span style="color:blue;">Handles</span> BackgroundWorker1.DoWork</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Do</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Dim</span> Str <span style="color:blue;">As</span> <span style="color:blue;">String</span> = ReadText()</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">If</span> <span style="color:blue;">Not</span> Str = <span style="color:maroon;">&#8220;Online&#8221;</span> <span style="color:blue;">Or</span> Str = <span style="color:maroon;">&#8220;(AFK) Away From Keyboard&#8221;</span> <span style="color:blue;">Then</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span>SetPlayingInfo(<span style="color:maroon;">&#8220;Now Playing&#8221;</span>, <span style="color:maroon;">&#8220;i__h4x Logger&#8221;</span>, ReadText(), IconType.Games)</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Else</span> <span style="color:green;">&#8221;Does same as in Changed</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span>SetPlayingInfo(<span style="color:maroon;">&#8220;Now Playing&#8221;</span>, <span style="color:maroon;">&#8220;i__h4x Logger&#8221;</span>, <span style="color:maroon;">&#8220;Nothing&#8221;</span>, IconType.Games)</span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span>work = <span style="color:blue;">False</span> <span style="color:green;">&#8221;If the game has been closed, then it ends the bgw</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">If</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span>System.Threading.Thread.Sleep(200) <span style="color:green;">&#8221;pauses the loop</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">Loop</span> <span style="color:blue;">Until</span> work = <span style="color:blue;">False</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span>BackgroundWorker1.WorkerSupportsCancellation = <span style="color:blue;">True</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span>BackgroundWorker1.CancelAsync() <span style="color:green;">&#8221;ends the bgw</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;"><span> </span><span style="color:blue;">End</span> <span style="color:blue;">Sub</span></span></p>
<p class="MsoNormal"><span style="font-size:8pt;">End</span><span style="font-size:8pt;"> <span style="color:blue;">Class</span></span></p>
<p class="MsoNormal">
<p class="MsoNormal">This will change your MSN personal message to whatever you have in Xfire, you can see it change as you type, expect to see a full project released soon.</p>
<p class="MsoNormal"><span style="font-size:10pt;"> </span></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ih4x.wordpress.com/32/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ih4x.wordpress.com/32/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ih4x.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ih4x.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ih4x.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ih4x.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ih4x.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ih4x.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ih4x.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ih4x.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ih4x.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ih4x.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ih4x.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ih4x.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ih4x.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ih4x.wordpress.com/32/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ih4x.wordpress.com&amp;blog=3140361&amp;post=32&amp;subd=ih4x&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ih4x.wordpress.com/2008/04/27/vb-net-msn-xfire-personal-message/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/810cb4ebed3e0db0c0d9777516931db0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sim0n</media:title>
		</media:content>
	</item>
		<item>
		<title>C# &#8211; MSN Conversation Window Blocking</title>
		<link>http://ih4x.wordpress.com/2008/04/24/c-msn-conversation-window-blocking/</link>
		<comments>http://ih4x.wordpress.com/2008/04/24/c-msn-conversation-window-blocking/#comments</comments>
		<pubDate>Thu, 24 Apr 2008 18:42:08 +0000</pubDate>
		<dc:creator>sim0n</dc:creator>
				<category><![CDATA[C#.net]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Event]]></category>
		<category><![CDATA[Hook]]></category>
		<category><![CDATA[MSN]]></category>

		<guid isPermaLink="false">http://ih4x.wordpress.com/?p=31</guid>
		<description><![CDATA[using System; using System.Windows.Forms; using System.Runtime.InteropServices;   namespace MSN_Event_Hooker     //Blocks the opening of any MSN conversation window {     public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();             MessengerAPI.Messenger MSN = new MessengerAPI.Messenger();             MSN.OnIMWindowCreated += new MessengerAPI.DMessengerEvents_OnIMWindowCreatedEventHandler(OnIMWindowCreated);         }         void OnIMWindowCreated(object plMWindow)         {             [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ih4x.wordpress.com&amp;blog=3140361&amp;post=31&amp;subd=ih4x&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:blue;font-family:&quot;">using</span><span style="font-size:10pt;font-family:&quot;"> System;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:blue;font-family:&quot;">using</span><span style="font-size:10pt;font-family:&quot;"> System.Windows.Forms;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:blue;font-family:&quot;">using</span><span style="font-size:10pt;font-family:&quot;"> System.Runtime.InteropServices;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;color:blue;font-family:&quot;">namespace</span><span style="font-size:10pt;font-family:&quot;"> MSN_Event_Hooker</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>    </span><span style="color:green;">//Blocks the opening of any MSN conversation window</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;">{</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>    </span><span style="color:blue;">public</span> <span style="color:blue;">partial</span> <span style="color:blue;">class</span> <span style="color:#2b91af;">Form1</span> : <span style="color:#2b91af;">Form</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>    </span>{</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>        </span><span style="color:blue;">public</span> Form1()</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>        </span>{</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>            </span>InitializeComponent();</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>            </span>MessengerAPI.<span style="color:#2b91af;">Messenger</span> MSN = <span style="color:blue;">new</span> MessengerAPI.<span style="color:#2b91af;">Messenger</span>();</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>            </span>MSN.OnIMWindowCreated += <span style="color:blue;">new</span> MessengerAPI.<span style="color:#2b91af;">DMessengerEvents_OnIMWindowCreatedEventHandler</span>(OnIMWindowCreated);</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>        </span>}</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>        </span><span style="color:blue;">void</span> OnIMWindowCreated(<span style="color:blue;">object</span> plMWindow)</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>        </span>{</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>            </span>MessengerAPI.<span style="color:#2b91af;">IMessengerWindow</span> theWindow = (MessengerAPI.<span style="color:#2b91af;">IMessengerWindow</span>)plMWindow;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>            </span><span style="color:blue;">int</span> wHwnd = theWindow.HWND;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>            </span><span style="color:#2b91af;">IntPtr</span> cwHwnd;</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>            </span>cwHwnd = <span style="color:blue;">new</span> <span style="color:#2b91af;">IntPtr</span>(wHwnd);</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>     </span><span>       </span>theWindow.Close();</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>        </span>}</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;"><span>    </span>}</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:10pt;font-family:&quot;">}</span></p>
<p class="MsoNormal" style="margin:0;"><span><span style="font-size:small;font-family:Times New Roman;"> </span></span></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/ih4x.wordpress.com/31/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/ih4x.wordpress.com/31/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ih4x.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ih4x.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ih4x.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ih4x.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ih4x.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ih4x.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ih4x.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ih4x.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ih4x.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ih4x.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ih4x.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ih4x.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ih4x.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ih4x.wordpress.com/31/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ih4x.wordpress.com&amp;blog=3140361&amp;post=31&amp;subd=ih4x&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ih4x.wordpress.com/2008/04/24/c-msn-conversation-window-blocking/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/810cb4ebed3e0db0c0d9777516931db0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sim0n</media:title>
		</media:content>
	</item>
	</channel>
</rss>
