DesktopX and Homeseer

Awhile back there was some interested on being able to extend HS onto the desktop using DesktopX. I have begun a preliminary DX script that is working for me on a remote PC running DX to interface with HS on my main machine:
Sub Object_OnScriptEnter
End Sub
Sub Object_OnStateChange(state)
If state = “Mouse down” Then
Dim hs
Set hs = CreateObject(“Homeseer.Application”,”pctv”)
If hs.ison (“a2”) Then hs.execx10 “a2″,”off”,0 Else hs.execx10 “a2″,”on”,0
Set hs = nothing
End If
End Sub
Sub Object_OnScriptExit
End Sub
All it does right now is to turn a light on or off based on the current status. Still have a few things to add once I figure them out, such as –
Getting the status of a device from HS and storing it.
Storing the device code so that it does not have to be hard-coded into the script. Easier to clone the object and have them for several different ones.
Setting the graphic based upon device status so that it matches the device state.
If anyone has any suggestions, or feedback, I would be glad to hear it.