Fun with PowerShell and Skype

When skyping with my boss I remembered that I can access Skype through COM interface. What can you do with it? You can start with some fun. You can look at it in action.

$skype = New-Object -ComObject Skype4Com.Skype
$timer  = New-Object Timers.Timer
$timer.Interval = 700
$job = Register-ObjectEvent $timer Elapsed -Action {$skype.ChangeUserStatus((1,2,4)[$global:i++%3])}
$timer.Enabled = $true

I think everything is pretty clear. The script changes each 700 milliseconds your status to Online/Away/DND, so the icon changes from green to yellow and red. Nice effect, isn't it?
It seems that it works only for some time. After several minutes your friends sometimes don't see the changes any more, even though it appears working at your computer.

Have fun with PowerShell!

Meta: 2010-02-22, Pepa