Okay I am having a bit of difficulty here. Trying to make a loop through all my lighting devices and having an issue not being able to reference the light names from an array. Hoping someone can tell me what I am doing wrong. This is obviously only a section of the code, but if i can get this part to work the rest is already working. I tried doing the double quotes in the array name already """Dallas Server Rack""" that didn't work either. Can anyone see what I am doing wrong?
***This code works***
hs.PluginFunction("JowiHue", "", "SetLightsRGB", {False, "Dallas Server Rack", 255, "0,255,0", Nothing})
****************************
However if i put the name in an array and try and run this nothing happens
Dim Lind As Integer = 0
Dim device() As String = {"Dallas Underbed", "Dallas Front", "Dallas Frontdoor", "Dallas Backdoor", "Front1", "Front2", "Front4", "Front3", "LR TV", "Gameroom TV", "Adams Office TV", "Master bedroom TV", "Under Bed", "Server Rack", "Fish Tank", "Media room accent light 1", "Dallas living room lamp", "Dallas living room 2", "Dallas living room 3", "Dallas living room 1", "Dallas Office 3", "Dallas Office 1", "Dallas Office 2", "Dallas Master Bathroom Shelf", "Dallas Master Bath", "Dallas Server Rack"}
Lind = 25
hs.PluginFunction("JowiHue", "", "SetLightsRGB", {False, device(Lind), 255, "0,255,0", Nothing})
*******************************
Thanks in advance.
***This code works***
hs.PluginFunction("JowiHue", "", "SetLightsRGB", {False, "Dallas Server Rack", 255, "0,255,0", Nothing})
****************************
However if i put the name in an array and try and run this nothing happens
Dim Lind As Integer = 0
Dim device() As String = {"Dallas Underbed", "Dallas Front", "Dallas Frontdoor", "Dallas Backdoor", "Front1", "Front2", "Front4", "Front3", "LR TV", "Gameroom TV", "Adams Office TV", "Master bedroom TV", "Under Bed", "Server Rack", "Fish Tank", "Media room accent light 1", "Dallas living room lamp", "Dallas living room 2", "Dallas living room 3", "Dallas living room 1", "Dallas Office 3", "Dallas Office 1", "Dallas Office 2", "Dallas Master Bathroom Shelf", "Dallas Master Bath", "Dallas Server Rack"}
Lind = 25
hs.PluginFunction("JowiHue", "", "SetLightsRGB", {False, device(Lind), 255, "0,255,0", Nothing})
*******************************
Thanks in advance.
Comment