Can anyone help with this?
Works fine in Windows but not in Linux.
Getting End of Statement Expected.
Works fine in Windows but not in Linux.
Code:
Sub MuteTog (ByVal Parms() As String) Dim theZone As Double = parms(0) Dim curVol As Double = hs.DeviceValueEx(theZone) Dim lastVol As String if curVol > 0 then hs.CreateVar("volSet") lastVol = hs.SaveVar("volSet",curVol) Dim cc as HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(theZone, True, "(value)", False, False) cc.ControlValue = 0 Dim cr as HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(cc) Elseif curVol = 0 then lastVol = hs.GetVar("volSet") Dim cc as HomeSeerAPI.CAPI.CAPIControl = hs.CAPIGetSingleControl(theZone, True, "(value)", False, False) cc.ControlValue = lastVol Dim cr as HomeSeerAPI.CAPI.CAPIControlResponse = hs.CAPIControlHandler(cc) hs.DeleteVar("volSet") End if End Sub
Comment