Busylight Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
haichen
Posts: 631
Joined: 09 Feb 2014, 08:24

Busylight

30 Dec 2017, 08:06

I've a Busylight from Kuando at work. It's a busy indicator light. It is integrated in our Skype for Business System. I have some Ideas to use it for other things so I played a bit.You can download a SDK and some Examples in VBA and c#. I tried to make it run with AHK (CLR.ahk and COM) without success (I'm not very experienced in using VBA,C# and CLR.ahk or COM). But the last days i found some working Powershell commands.
I hope someone can give some hints to translate it to Autohotkey:

Code: Select all

add-type -Path "BusylightSDK.dll"

$BusylightDevice = New-Object -TypeName Busylight.sdk
$BusylightDevice
# gives some Information

$Color =  New-Object -TypeName Busylight.BusylightColor
$Color.BlueRGBValue= 255
$BusylightDevice.Light($Color)
# Glows Blue

$SDK =  New-Object -TypeName Busylight.SDK
$SDK.Blink(25,100,0,10,10)
# blinking
$SDK.Blink(0,0,0,0,0) 
#off

$clip = New-Object -TypeName Busylight.BusylightJingleClip
$SDK.Jingle(10,250,30,$clip,50)
# Blinking and playing a short jingle, but I think its not the correct way to use it because BusylightJingleClip is an Enum
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Busylight

30 Dec 2017, 08:20

Just for the record: https://www.busylight.com
User avatar
haichen
Posts: 631
Joined: 09 Feb 2014, 08:24

Re: Busylight

30 Dec 2017, 10:50

Yes, thanks to mention it. I forgot it.
User avatar
haichen
Posts: 631
Joined: 09 Feb 2014, 08:24

Re: Busylight  Topic is solved

31 Dec 2017, 07:10

I compared the PowerShell commands to my attempts with clr.ahk. Now it works:

Code: Select all

#Persistent
#include clr.ahk


dllfile:="BusylightSDK.dll"
asm := CLR_LoadLibrary(dllfile)

BusylightDevice := CLR_CreateObject(asm, "Busylight.SDK")
;msgbox, % BusylightDevice.tostring()

color := CLR_CreateObject(asm, "Busylight.BusylightColor")
Color.BlueRGBValue := 255
BusylightDevice.Light(Color)
Color.BlueRGBValue := 0
sleep 5000
BusylightDevice.Light(Color)
;Busylight shines blue for 5 sec.

Color.BlueRGBValue := 50
Color.RedRGBValue := 155
BusylightDevice.Blink(color,10,10)
sleep, 5000
Color.BlueRGBValue := 0
Color.RedRGBValue := 0
BusylightDevice.Blink(color,0,0)
sleep, 5000
;Busylight is blinking for 5 sec.

Color.BlueRGBValue := 50
Color.RedRGBValue := 155
Color.GreenRGBValue := 50
clip := CLR_CreateObject(asm, "Busylight.BusylightJingleClip")
BusylightDevice.Jingle(color,clip,50)
sleep, 5000
Color.BlueRGBValue := 0
Color.RedRGBValue := 0
Color.GreenRGBValue := 0
BusylightDevice.Blink(color,0,0)
;Busylight blinks and plays a jingle for 5 sec.
return
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Busylight

31 Dec 2017, 07:48

Congrats, that means you can morse now with that beautiful colleague a few desks away :thumbup: (AFAIR there's an AHK morse converter archived somewhere at the forum? :think:)
User avatar
haichen
Posts: 631
Joined: 09 Feb 2014, 08:24

Re: Busylight

31 Dec 2017, 09:35

Yes and no one knows...

I've written a small monitoring script that can attract the attention of the user with help of the busylight. .. But it also could be a Birthday-alert ... or time to lunch ..

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Anput, mikeyww, Nerafius, scriptor2016 and 109 guests