Coding events with variables
Posted: Sun Apr 22, 2012 6:33 pm
Hi,
I'm trying to make myself a little wakeup script since I've recently installed a remote dimmer in the ridiculously powerful lamp in my bedroom.
My ideal solution rather than use a very long and unwieldy event would be to have an action something like:
FOR i = 7 TO 91 STEP 6
Devices.SetDevice(Dev_26_Value, "Dim " & i)
WAIT 120
NEXT
However, I don't seem to be able to use variables in action scripts. Is there any way to do so, or is there another, better solution to my issue?
I also considered something like making an action that reads the current dimmer setting and increments it. Then if the alarm conditions are present I can run the action every two minutes, but I'm stumbling somewhat here as well.
Any ideas appreciated!
I'm trying to make myself a little wakeup script since I've recently installed a remote dimmer in the ridiculously powerful lamp in my bedroom.
My ideal solution rather than use a very long and unwieldy event would be to have an action something like:
FOR i = 7 TO 91 STEP 6
Devices.SetDevice(Dev_26_Value, "Dim " & i)
WAIT 120
NEXT
However, I don't seem to be able to use variables in action scripts. Is there any way to do so, or is there another, better solution to my issue?
I also considered something like making an action that reads the current dimmer setting and increments it. Then if the alarm conditions are present I can run the action every two minutes, but I'm stumbling somewhat here as well.
Any ideas appreciated!