Using Sliders to control two lights
Posted: Wed Nov 17, 2004 11:12 pm
All -
I would like to control the dim level of two X-10 lights by using the preset dim X10 codes.
I have been able to set up a script that obtains the desired dim level (0 - 31) by using GetPropertyValue.
However, what I'd really like to do is invoke this script to set the dim levels of the two lights whenever the slider itself is adjusted. Right now, I set the slider to the value I want and press a second button to invoke the script (which basically reads the value of the slider and sends it to the two lights).
Any way I can get this script to invoke directly after the slider is adjusted without having to press a 2nd button? The only way I can see a task executing is when a condition tests an absolute value (e.g a specific quantity) but I would think that the slider would have an arbitrary value so there is no specific value I can test for in order to invoke the script.
One other thing, in the script, I have two SetPropertyValue commands in adjacent lines. So why is there a delay of roughly 2 seconds between the sending of the preset dim command to the first light and then to the second light? Can this be shortened?
Suggestions?
TIA.
I would like to control the dim level of two X-10 lights by using the preset dim X10 codes.
I have been able to set up a script that obtains the desired dim level (0 - 31) by using GetPropertyValue.
However, what I'd really like to do is invoke this script to set the dim levels of the two lights whenever the slider itself is adjusted. Right now, I set the slider to the value I want and press a second button to invoke the script (which basically reads the value of the slider and sends it to the two lights).
Any way I can get this script to invoke directly after the slider is adjusted without having to press a 2nd button? The only way I can see a task executing is when a condition tests an absolute value (e.g a specific quantity) but I would think that the slider would have an arbitrary value so there is no specific value I can test for in order to invoke the script.
One other thing, in the script, I have two SetPropertyValue commands in adjacent lines. So why is there a delay of roughly 2 seconds between the sending of the preset dim command to the first light and then to the second light? Can this be shortened?
Suggestions?
TIA.