How to set userdefined timevalue from vbscript?

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
alibaba
Member
Posts: 13
Joined: Mon Sep 20, 2004 5:26 pm

How to set userdefined timevalue from vbscript?

Post by alibaba »

Hi there

I defined a userdefined time value-property in a device. I want to write a certain time to it using vbscript, but I don't know the correct format and everything I tried lead to an error.
Does anybody have information about the correct format?

Thanks -Alex-
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Re: How to set userdefined timevalue from vbscript?

Post by ScottBot »

Here's an example of setting just the time (hour, minute, second) of a time Property.
SetPropertyValue "Null Device.MyTimeProperty", "Hour=09, Minute=45, Second=21"
Here's another example of setting a time Property without seconds.
SetPropertyValue "Null Device.MyTimeProperty", "Hour=09, Minute=45"
An easy way to figure out the exact format is to go ahead and set the value through the UI in HouseBot. Then click on the Property and inspect the 'Value' field to see how the server formatted it.
Scott
alibaba
Member
Posts: 13
Joined: Mon Sep 20, 2004 5:26 pm

Re: How to set userdefined timevalue from vbscript?

Post by alibaba »

Hi Scott
Thanks, using this format I was successful!
Best regards
-Alex-
Post Reply