Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Blinky Tape Powershell example. Monitoring for missed Skype chat messages

I've just received my BlinkyTape today and I've had lots of fun hooking it up to PowerShell and Skype to provide a more obvious visual indicator when I miss a chat message...

A little over the top perhaps, but still fun.

Note: this only works with 32-bit PowerShell as Skype is 32-bit only (sorry for the poor formatting):

function flash() {

$port= new-Object System.IO.Ports.SerialPort COM3,115200,None,8,One
$port.open()
$port.Write([byte]0xFF, 0, 1)

for ($k=0; $k-lt3;$k++){
for ($j=0;$j-lt60;$j++){
for ($i=0;$i-le $j;$i++) {
$port.Write([byte]0x00, 0, 1)
$port.Write([byte]0x00, 0, 1)
$port.Write([byte]0xFE, 0, 1)
}
$port.Write([byte]0xFF, 0, 1)
}

for ($j=0;$j-lt60;$j++){
for ($i=0;$i-le $j;$i++) {
$port.Write([byte]0xFE, 0, 1)
$port.Write([byte]0x00, 0, 1)
$port.Write([byte]0x00, 0, 1)
}

$port.Write([byte]0xFF, 0, 1)
}
}

for ($i=0;$i-lt60;$i++) {
$port.Write([byte]0x00, 0, 1)
$port.Write([byte]0x00, 0, 1)
$port.Write([byte]0x00, 0, 1)
}
$port.Write([byte]0xFF, 0, 1)
$port.close()
}

$skype = New-Object -COM "Skype4COM.Skype"

while (1) {
if ($skype.MissedChats.count -gt 0){
"eek!"
flash
}
sleep(10)
}

Cheers,

Steve

Comments

  • Sweet, thanks for posting your project! Any chance you have a video or photo to demonstrate it?

    I've only got a Mac with me at the moment, but will check it out on my Windows machine when I get back to the office.
Sign In or Register to comment.