Hi, I currently have a script that gets the device name of my alarm and speaks it when a zone is opened. It works great, but I want it to only speak the name of the zone without the location. In my case, I want it to "Front Door" instead of "Security DSC Front Door". Can this be done? If so, how?
Thanks in advanced!
Thanks in advanced!
Code:
Sub Main(parms As Object) Dim zonerefs() As Integer = {58,59,60,61,62} hs.CreateVar("zonestatus") For each zoneref As Integer in zonerefs If hs.devicevalue(zoneref) = "609" then hs.SaveVar("zonestatus",hs.devicename(zoneref)) hs.Speak ("$$GLOBALVAR:zonestatus:") End if Next End Sub
Comment