hi all,
im building a script to make an event when running..
but there is one thing i dont get , i get an error: ')' expected.
this is the script:
the line what gives the error is this one
hs.AddDeviceActionToEvent(EvRef,hs.CAPIGetSingleControl(hs.G etDeviceRef("1623"),true,"on",false,true))
i use tenscript aid. but where to put this line?
hs.CAPIControlHandler(hs.CAPIGetSingleControl(1623,True,"Off ",False,False))
im building a script to make an event when running..
but there is one thing i dont get , i get an error: ')' expected.
this is the script:
the line what gives the error is this one
hs.AddDeviceActionToEvent(EvRef,hs.CAPIGetSingleControl(hs.G etDeviceRef("1623"),true,"on",false,true))
i use tenscript aid. but where to put this line?
hs.CAPIControlHandler(hs.CAPIGetSingleControl(1623,True,"Off ",False,False))
Code:
Sub CreateEvent(StartTime,StartDate,Delay,DeviceName) Dim EvRef As Integer Dim EvTime As Date dim CC as CAPIControl EvTime = "09:30" ' Create the Event EvRef = hs.NewEventEx("New Test Event","Test","") ' Set the time trigger hs.EventSetTimeTrigger(EvRef,EvTime) ' Add the device action "A13 On" which is the water heater hs.AddDeviceActionToEvent(EvRef,hs.CAPIGetSingleControl(hs.G etDeviceRef("1623"),true,"on",false,true)) ' Enable the Event hs.DeleteAfterTrigger_Set(EvRef) hs.EnableEventByRef(EvRef) End Sub
Comment