Rupp has explained it better than I could.
The idea is to look at a database and pull TV Programs that have titles of interest and speak them a certain time before they show. I also use the Message Server plugin to broadcast the TV Programs to certain PCs. Don't laugh, my stuff isn't pretty. There are some checks to see the state of the speaker switch and if my wife and I are asleep. The message 'x' is created when the program showtime.vbs builds the timed event.
PHP Code:
Sub Main(x)
'ShowSpeak.vbs
'Get current state of speaker switch
If hs.IsOff("_9")Then
ComputerSpeakers = "off"
Else
ComputerSpeakers = "on"
End if
'Get current state of 'Sleep'
If hs.DeviceStatus("A17") = 3 Then
SleepTime = False
Else
SleepTime = True
End If
If SleepTime = False Then
If ComputerSpeakers = "off" Then
hs.ExecX10 "_9", "on", 0, 0
hs.speak x,True
hs.ExecX10 "_9", "off",0,0
Else
hs.speak x,True
End if
End if
hs.plugin("message server").messagetoclient x ,"TV Alert" ,0,True,False,Client
End Sub
Leave a comment: