Hi
i created a script but nothing happens,
if i use only one it works but i need more than 20
i want like more if commands in my script,
In my other script i have multiple IF statements and only 1 End IF
like this but i cant get it to work , when i execute nothing happens no error or nothing
regards
i created a script but nothing happens,
if i use only one it works but i need more than 20
i want like more if commands in my script,
Code:
Sub Main(ByVal parm as Object) If (hs.devicevalue(2556) = 0) Then hs.TriggerEvent ("set 1") If (hs.devicevalue(2556) = 1) Then hs.TriggerEvent ("set 2") else hs.WriteLog("AV", "Device Not Selected") End If End If End Sub
like this but i cant get it to work , when i execute nothing happens no error or nothing
Code:
If hs.DeviceStringByName ("test").contains ("test1") Then hs.blabla If hs.DeviceStringByName ("test").contains ("test2") Then hs.blabla If hs.DeviceStringByName ("test").contains ("test3") Then hs.blabla If hs.DeviceStringByName ("test").contains ("test4") Then hs.blabla If hs.DeviceStringByName ("test").contains ("test5") Then hs.blabla if hs.DeviceStringByName ("test").contains ("test6") Then hs.blabla End If
regards
Comment