Originally posted by Jez
View Post
Announcement
Collapse
No announcement yet.
Set the colour from a vb.net script
Collapse
X
-
Originally posted by alexbk66 View Post
Can you please post the examples how you call the functions
For Pushover:
Code:Dim CO(8) as object CO(0) = "All Clients" CO(1) = "Zappi is waiting for surplus." CO(2) = "" CO(3) = "normal" CO(4) = "magic" CO(5) = Nothing CO(6) = Nothing CO(7) = Nothing hs.PluginFunction("Pushover 3P", "", "Pushscript", CO)
Code:Dim Animations() as string = hs.PluginFunction("JowiHue", "", "GetAnimations", Nothing) 'get the list of animations
Comment
-
Please update to ver 4.0.0.21 (TmDS error should be fixed too).
In all my plugins you can access device functions via PluginFunction by appending Ex to the function name and passing first arg. device ref., i.e. the color device has SetColorHex function, so to set the color to red (FF0000) use the following (second arg. 0 you can use to set the color by unsigned integer value, instead of the color string, but I never tried)
Code:&shs.PluginFunction("AK Ikea", "", "SetColorHexEx", new object[] {3368, 0, "FF0000"});
Note, you can use either root light ref. or the "custom color" device ref.
Comment
-
Originally posted by alexbk66 View PostPlease update to ver 4.0.0.21 (TmDS error should be fixed too).
In all my plugins you can access device functions via PluginFunction by appending Ex to the function name and passing first arg. device ref., i.e. the color device has SetColorHex function, so to set the color to red (FF0000) use the following (second arg. 0 you can use to set the color by unsigned integer value, instead of the color string, but I never tried)
Code:&shs.PluginFunction("AK Ikea", "", "SetColorHexEx", new object[] {3368, 0, "FF0000"});
Note, you can use either root light ref. or the "custom color" device ref.
I tried two combinations but nothing positive to report I'm afraid. My attempts and the errors are below:
Attempt 1
-------------
shs.PluginFunction("AK Ikea", "", "SetColorHexEx", new object[] {2217, 0, "FF0000"})
Error
Running script(2) &shs.PluginFunction("AK Ikea", "", "SetColorHexEx", new object[] {2217, 0, "FF0000"}), init error: Expected ')'
Attempt 2
-------------
shs.PluginFunction("AK Ikea", "", "SetColorHexEx", {2217, 0, "FF0000"})
Error
Running script(2) &shs.PluginFunction("AK Ikea", "", "SetColorHexEx", {2217, 0, "FF0000"}), init error: Invalid character
Comment
-
Originally posted by Jez View PostI tried two combinations but nothing positive to report I'm afraid. My attempts and the errors are below:
Attempt 1 is using C#, but missing semicolon at the end.
Comment
Comment