X xroentgen New Member Dec 27, 2009 #1 Can some one give me an example of a simple Vb script? All I want to do is activate a scene when I trigger an x-10 on. Thanks
Can some one give me an example of a simple Vb script? All I want to do is activate a scene when I trigger an x-10 on. Thanks
123 Senior Member Dec 28, 2009 #2 xroentgen said: Can some one give me an example of a simple Vb script? All I want to do is activate a scene when I trigger an x-10 on. Click to expand... This example activates a Scene called "Evening" whenever a Light called "PorchLight" is turned on. In Builder, click Home in the Shortcut Bar. Navigate to a Light object somewhere in your Premise Home. This example uses one called "PorchLight". Right-click the PorchLight object and select New > Script > Property Change. Select the PowerState property. Premise will create a blank PropertyChange script called "OnChangePowerState" Enter the following script in the script editor (the big blank area!): Code: if sysevent.newVal = true then Scenes.Evening.Play = true end if To commit the script (i.e. make Premise use it immediately) press F12 or simply click somewhere outside of the script editor. What this script does: Whenever PowerState is True (i.e. turned on) the Evening scene is activated. For more information, search Premise's Help for "PropertyChange" scripts.
xroentgen said: Can some one give me an example of a simple Vb script? All I want to do is activate a scene when I trigger an x-10 on. Click to expand... This example activates a Scene called "Evening" whenever a Light called "PorchLight" is turned on. In Builder, click Home in the Shortcut Bar. Navigate to a Light object somewhere in your Premise Home. This example uses one called "PorchLight". Right-click the PorchLight object and select New > Script > Property Change. Select the PowerState property. Premise will create a blank PropertyChange script called "OnChangePowerState" Enter the following script in the script editor (the big blank area!): Code: if sysevent.newVal = true then Scenes.Evening.Play = true end if To commit the script (i.e. make Premise use it immediately) press F12 or simply click somewhere outside of the script editor. What this script does: Whenever PowerState is True (i.e. turned on) the Evening scene is activated. For more information, search Premise's Help for "PropertyChange" scripts.
X xroentgen New Member Dec 30, 2009 #3 Perfect! That was exactly what I needed. Thank you 123, your commitment to this forum is great!