Announcement

Collapse
No announcement yet.

Scripting in HS4

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Scripting in HS4

    I swear this script worked in HS3 but throws an error in HS4.


    Thanks,
    Tim



    11/30/2022 7:18:49 PM
    HomeSeer
    Error
    Compiling script (1)ColrLeftChng.vb: Character is not valid.
    11/30/2022 7:18:49 PM
    HomeSeer
    Error
    Compiling script (1)ColrLeftChng.vb: String constants must end with a double quote.



    Sub Main(ByVal Params As Object)

    Dim s As Double = hs.DeviceValueEx(954)

    if s =0 then

    hs.PluginFunction("JowiHue", "", "SetLightsOff", {False, "WestLeft”})


    elseif s =1 then
    hs.PluginFunction("JowiHue", "", "SetLightsRGB", {False, "WestLeft", 255, “237,28,36”, 20})


    elseif s =2 then
    hs.PluginFunction("JowiHue", "", "SetLightsRGB", {False, "WestLeft", 255, “63,72,204”, 20})


    elseif s =3 then
    hs.PluginFunction("JowiHue", "", "SetLightsRGB", {False, "WestLeft", 255, “28,147,64”, 20})


    elseif s =4 then
    hs.PluginFunction("JowiHue", "", "SetLightsRGB", {False, "WestLeft", 255, “255,242,0”, 20})


    elseif s =5 then
    hs.PluginFunction("JowiHue", "", "SetLightsRGB", {False, "WestLeft", 255, “83,203,255”, 20})


    elseif s =6 then
    hs.PluginFunction("JowiHue", "", "SetLightsRGB", {False, "WestLeft", 255, “122,254,103”, 20})


    elseif s =7 then
    hs.PluginFunction("JowiHue", "", "SetLightsRGB", {False, "WestLeft", 255, “255,127,39”, 20})


    elseif s =8 then
    hs.PluginFunction("JowiHue", "", "SetLightsRGB", {False, "WestLeft", 255, “255,255,255”, 20})






    end if

    end sub​
    FB Page - https://www.facebook.com/pages/Capt-Tim/209398425902188

    HSTouch Layouts - https://www.facebook.com/media/set/?...5902188&type=3

    #2
    OMG can we delete this post.
    I have been looking at this script for half an hour.
    Compare the quote marks around this word - "WestLeft"..... to this one - “237,28,36”
    I changed the second ones, now it works.

    Tim
    FB Page - https://www.facebook.com/pages/Capt-Tim/209398425902188

    HSTouch Layouts - https://www.facebook.com/media/set/?...5902188&type=3

    Comment


      #3
      Originally posted by fungun View Post
      OMG can we delete this post.
      I have been looking at this script for half an hour.
      Compare the quote marks around this word - "WestLeft"..... to this one - “237,28,36”
      I changed the second ones, now it works.

      Tim
      Looks like iOS quotes Got me more than once.
      HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

      Comment

      Working...
      X