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

<channel>
	<title>Overpass Experiences &#187; Skype</title>
	<atom:link href="http://www.wroolie.co.uk/tag/skype/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wroolie.co.uk</link>
	<description>The Eric Wroolie Blog</description>
	<lastBuildDate>Fri, 27 Jan 2012 09:45:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Automate Skype Status with PowerShell</title>
		<link>http://www.wroolie.co.uk/2009/09/18/automate-skype-status-with-powershell/</link>
		<comments>http://www.wroolie.co.uk/2009/09/18/automate-skype-status-with-powershell/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 05:32:58 +0000</pubDate>
		<dc:creator>Eric Wroolie</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Software Dev & Productivity]]></category>
		<category><![CDATA[Automation]]></category>
		<category><![CDATA[Skype]]></category>

		<guid isPermaLink="false">http://www.wroolie.co.uk/2009/09/18/automate-skype-status-with-powershell/</guid>
		<description><![CDATA[One of the big problems I have with Skype is its lack of a scheduling feature.Â  I have a Skype dual phone which will ring when someone calls me on Skype, but I donât want the phone ringing in the middle of the night because someone from another time zone sees my status as âOnlineâ [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>One of the big problems I have with Skype is its lack of a scheduling feature.Â  I have a Skype dual phone which will ring when someone calls me on Skype, but I donât want the phone ringing in the middle of the night because someone from another time zone sees my status as âOnlineâ decides to call.Â  I use Skype frequently for work with virtual teams, so I canât just turn it off because I donât want to forget to turn it back on.Â  My status should show as âAwayâ when I havenât used my PC for a while, but this isnât always consistent and it doesnât cater for insomnia-induced tinkering on the pc.</p>
<div style="float:right"><a title="Wireless Skype Phone" href="http://www.flickr.com/photos/93378328@N00/133682485/" target="_blank"><img src="http://farm1.static.flickr.com/49/133682485_1bc5081434_m.jpg" border="0" alt="Wireless Skype Phone" /></a><br />
<small><a title="Attribution-ShareAlike License" href="http://creativecommons.org/licenses/by-sa/2.0/" target="_blank"><img src="http://www.wroolie.co.uk/wp-content/plugins/photo-dropper/images/cc.png" border="0" alt="Creative Commons License" width="16" height="16" align="absmiddle" /></a> <a href="http://www.photodropper.com/photos/" target="_blank">photo</a> credit: <a title="iBjorn" href="http://www.flickr.com/photos/93378328@N00/133682485/" target="_blank">iBjorn</a></small></div>
<p>Ideally, Skype would have a feature to set âOpening Hoursâ on your accountâI only want to show up as available between 8am and 8pm.Â  I bought the Pamela extra which does some scheduling, but you can set only one event per dayâie. I can set it to go offline at 8pm, but not to turn back on at 8am.</p>
<p>Since Skype offers a client API component, it is possible to create a scheduler to set your online status at different times using Windows Scheduler and a scripting tool.Â  I wrote this before in VBScript, but this being the dawn of Windows 7 with pre-installed PowerShell, I rewrote it as a PowerShell script.</p>
<p>If you are on XP or Vista and havenât installed PowerShell, you will need to do this before you can run these scripts.Â  <a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/download.mspx" target="_blank">Installation instructions for PowerShell are here</a>.Â  You will also need to set the execution policy.Â  You can find <a href="http://www.microsoft.com/technet/scriptcenter/topics/winpsh/manual/run.mspx" target="_blank">instructions for this here</a>.Â  I am running XP.</p>
<p>I hope this helps . . .</p>
<h3>Step 1: Install the Skype4Com component</h3>
<p>Skype still uses a COM component called Skype4Com which needs to be downloaded and registered on your local PC.Â  The component can be found at <a title="https://developer.skype.com/Download" href="https://developer.skype.com/Download">https://developer.skype.com/Download</a>.Â  Iâm using version 1.0.32, but you can probably use a later version.</p>
<p>Download the component, extract it to a directory (ie. &#8220;c:\skype\&#8221;) and type the following into the Run window:</p>
<blockquote><p><strong>regsvr32Â  c:\skype\Skype4COM-1.0.32\Skype4COM.dll</strong></p></blockquote>
<p>Make sure the directory point to the actual dll file to you downloaded.Â  You should get a response that it was registered successfully:</p>
<p><a href="http://www.wroolie.co.uk/content/images/AutomateSkypeStatuswithPowerShell_5C0F/image.png"><img style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" title="image" src="http://www.wroolie.co.uk/content/images/AutomateSkypeStatuswithPowerShell_5C0F/image_thumb.png" border="0" alt="image" width="244" height="67" /></a></p>
<h3>Step 2: Write the PowerShell script</h3>
<p>Now, write the PowerShell script to use the component.Â  Iâve created two scriptsâone sets my status to âOnlineâ, the other sets it to âOfflineâ.Â  You can probably create a single script with a parameter passed in if you wish (but I couldnât be bothered to figure out how to do this).</p>
<p>In the script, you have to create the Skype object, identify the current user, and change the status.</p>
<p>In my first script, I use the following code:</p>
<div id="codeSnippetWrapper">
<div id="codeSnippet" style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; direction: ltr; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: #f4f4f4; text-align: left;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; direction: ltr; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: white; text-align: left;"><span id="lnum1" style="color: #606060">   1:</span> <span style="color: #008000">#Create Skype Object</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; direction: ltr; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: #f4f4f4; text-align: left;"><span id="lnum2" style="color: #606060">   2:</span> $skype = New-Object -COM <span style="color: #006080">"Skype4COM.Skype"</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; direction: ltr; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: white; text-align: left;"><span id="lnum3" style="color: #606060">   3:</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; direction: ltr; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: #f4f4f4; text-align: left;"><span id="lnum4" style="color: #606060">   4:</span> <span style="color: #008000">#Get the logged in user</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; direction: ltr; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: white; text-align: left;"><span id="lnum5" style="color: #606060">   5:</span> $currentUser = $skype.CurrentUserProfile</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; direction: ltr; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: #f4f4f4; text-align: left;"><span id="lnum6" style="color: #606060">   6:</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; direction: ltr; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: white; text-align: left;"><span id="lnum7" style="color: #606060">   7:</span> <span style="color: #008000">#Get the Status vars</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; direction: ltr; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: #f4f4f4; text-align: left;"><span id="lnum8" style="color: #606060">   8:</span> $onlineStatus = $skype.Convert.TextToUserStatus(<span style="color: #006080">"ONLINE"</span>)</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; direction: ltr; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: white; text-align: left;"><span id="lnum9" style="color: #606060">   9:</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; direction: ltr; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: #f4f4f4; text-align: left;"><span id="lnum10" style="color: #606060">  10:</span> <span style="color: #008000">#Now Change your status</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; direction: ltr; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: white; text-align: left;"><span id="lnum11" style="color: #606060">  11:</span> $skype.ChangeUserStatus($onlineStatus)</pre>
<p><!--CRLF--></div>
</div>
<p>The main Skype call here is the âChangeUserStatusâ method.Â  I named the first script âSetSkypeStatus_on.ps1â.</p>
<p>The second script is almost identical, but it sets the status to âOfflineâ:</p>
<div id="codeSnippetWrapper">
<div id="codeSnippet" style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; direction: ltr; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: #f4f4f4; text-align: left;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; direction: ltr; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: white; text-align: left;"><span id="lnum1" style="color: #606060">   1:</span> <span style="color: #008000">#Create Skype Object</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; direction: ltr; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: #f4f4f4; text-align: left;"><span id="lnum2" style="color: #606060">   2:</span> $skype = New-Object -COM <span style="color: #006080">"Skype4COM.Skype"</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; direction: ltr; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: white; text-align: left;"><span id="lnum3" style="color: #606060">   3:</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; direction: ltr; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: #f4f4f4; text-align: left;"><span id="lnum4" style="color: #606060">   4:</span> <span style="color: #008000">#Get the logged in user</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; direction: ltr; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: white; text-align: left;"><span id="lnum5" style="color: #606060">   5:</span> $currentUser = $skype.CurrentUserProfile</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; direction: ltr; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: #f4f4f4; text-align: left;"><span id="lnum6" style="color: #606060">   6:</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; direction: ltr; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: white; text-align: left;"><span id="lnum7" style="color: #606060">   7:</span> <span style="color: #008000">#Get the Status vars</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; direction: ltr; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: #f4f4f4; text-align: left;"><span id="lnum8" style="color: #606060">   8:</span> $offlineStatus = $skype.Convert.TextToUserStatus(<span style="color: #006080">"OFFLINE"</span>)</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; direction: ltr; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: white; text-align: left;"><span id="lnum9" style="color: #606060">   9:</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; direction: ltr; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: #f4f4f4; text-align: left;"><span id="lnum10" style="color: #606060">  10:</span> <span style="color: #008000">#Now Change your status</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; direction: ltr; line-height: 12pt; font-family: 'Courier New',courier,monospace; background-color: white; text-align: left;"><span id="lnum11" style="color: #606060">  11:</span> $skype.ChangeUserStatus($offlineStatus)</pre>
<p><!--CRLF--></div>
</div>
<p>I named the second script âSetSkypeStatus_off.ps1â.</p>
<p>There are several other parameters you can pass into the âChangeUserStatusâ method.Â  Here are the values I know about:</p>
<table border="1" cellspacing="0" cellpadding="2" width="465">
<tbody>
<tr>
<td width="116" valign="top"><strong>Status</strong></td>
<td width="347" valign="top"><strong>Code Sample</strong></td>
</tr>
<tr>
<td width="116" valign="top">OFFLINE</td>
<td width="347" valign="top">$skype.Convert.TextToUserStatus(&#8220;OFFLINE&#8221;)</td>
</tr>
<tr>
<td width="116" valign="top">ONLINE</td>
<td width="347" valign="top">$skype.Convert.TextToUserStatus(&#8220;ONLINE&#8221;)</td>
</tr>
<tr>
<td width="116" valign="top">RINGING</td>
<td width="347" valign="top">$skype.Convert.TextToUserStatus(&#8220;RINGING&#8221;)</td>
</tr>
<tr>
<td width="116" valign="top">INPROGRESS</td>
<td width="347" valign="top">$skype.Convert.TextToUserStatus(&#8220;INPROGRESS&#8221;)</td>
</tr>
<tr>
<td width="116" valign="top">BUSY</td>
<td width="347" valign="top">$skype.Convert.TextToUserStatus(&#8220;BUSY&#8221;)</td>
</tr>
</tbody>
</table>
<p>Of course, you can automate most actions on the Skype client using the component (not just setting your online status).Â  You can schedule calls, send text messages, etc.Â  But Iâm only concerned with my online status.</p>
<h3>Step 3: Set up Windows Scheduled Tasks</h3>
<p>Now you have two scripts to go Offline and Online.Â  You just need to have something trigger them.Â  I use Windows Scheduled Tasks.Â  In Control Panel, go to the Scheduled Tasks window.Â  Youâll see a list of scheduled tasks for your pc.Â  Right client and select âAddââ&gt;âScheduled Taskâ (Donât go through the âAdd Scheduled Taskâ wizard).Â  Name your task âSkypeStatusOnâ.Â  Right-click the task and choose âPropertiesâ.</p>
<p>Now, in the âRun:â box, type the following command:</p>
<blockquote><p><strong>powershell -command &#8220;&amp; &#8216;c:\temp\SetSkypeStatus_on.ps1&#8242; &#8220;</strong></p></blockquote>
<p>Make sure the path is pointed to you PowerShell script youâve created.</p>
<p><a href="http://www.wroolie.co.uk/content/images/AutomateSkypeStatuswithPowerShell_5C0F/image_3.png"><img style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" title="image" src="http://www.wroolie.co.uk/content/images/AutomateSkypeStatuswithPowerShell_5C0F/image_thumb_3.png" border="0" alt="image" width="218" height="244" /></a></p>
<p>You can now use the âScheduleâ tab to schedule when you want the script to run.Â  Click âOKâ.</p>
<p>Now do the same for the other script.Â  You can test these scripts by right-clicking the task and selecting âRunâ.Â  You should be able to watch your Skype status go from offline to online.</p>
<p>By the way, the first time you run this,<strong> Skype will ask if you want PowerShell to have access to Skype.Â  Click âAllowâ.</strong></p>
<p>If everything works successfully, your pc should set your online status and give you the âOpening Hoursâ that Skype forgot.</p>
<p>I hope you find this useful.</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=Automate+Skype+Status+with+PowerShell+http%3A%2F%2Fwroolie.co.uk%2F%3Fp%3D463" title="Post to Twitter"><img class="nothumb" src="http://www.wroolie.co.uk/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro3.png" alt="Post to Twitter" /></a> <a class="tt" href="http://delicious.com/post?url=http://www.wroolie.co.uk/2009/09/18/automate-skype-status-with-powershell/&amp;title=Automate+Skype+Status+with+PowerShell" title="Post to Delicious"><img class="nothumb" src="http://www.wroolie.co.uk/wp-content/plugins/tweet-this/icons/en/delicious/tt-delicious-micro3.png" alt="Post to Delicious" /></a> <a class="tt" href="http://digg.com/submit?url=http://www.wroolie.co.uk/2009/09/18/automate-skype-status-with-powershell/&amp;title=Automate+Skype+Status+with+PowerShell" title="Post to Digg"><img class="nothumb" src="http://www.wroolie.co.uk/wp-content/plugins/tweet-this/icons/en/digg/tt-digg-micro3.png" alt="Post to Digg" /></a> <a class="tt" href="http://www.facebook.com/share.php?u=http://www.wroolie.co.uk/2009/09/18/automate-skype-status-with-powershell/&amp;t=Automate+Skype+Status+with+PowerShell" title="Post to Facebook"><img class="nothumb" src="http://www.wroolie.co.uk/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook-micro3.png" alt="Post to Facebook" /></a> <a class="tt" href="http://ping.fm/ref/?method=microblog&amp;title=Automate+Skype+Status+with+PowerShell&amp;link=http://www.wroolie.co.uk/2009/09/18/automate-skype-status-with-powershell/" title="Post to Ping.fm"><img class="nothumb" src="http://www.wroolie.co.uk/wp-content/plugins/tweet-this/icons/en/ping/tt-ping-micro3.png" alt="Post to Ping.fm" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.wroolie.co.uk/2009/09/18/automate-skype-status-with-powershell/&amp;title=Automate+Skype+Status+with+PowerShell" title="Post to StumbleUpon"><img class="nothumb" src="http://www.wroolie.co.uk/wp-content/plugins/tweet-this/icons/en/su/tt-su-micro3.png" alt="Post to StumbleUpon" /></a></p></div><p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.wroolie.co.uk/2009/09/18/automate-skype-status-with-powershell/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
