PDA

View Full Version : Auto Dimroom Script


maarten
04-25-2006, 04:22 PM
The auto dimmroom script:


ON ENTER { ptime GLOBAL hr GLOBAL 10 ME SETALARM
{
{ DATETIME 86400 % ti = ti 3600 / 5 - hr = }
{ DATETIME 2147483647 + 86400 % 11647 + 86400 % ti = ti 3600 / hr = }
DATETIME 0 >= IFELSE
{ 24 hr -= } hr 24 > IF
{ 24 hr += } hr 0 < IF
}
ptime DEF }
ON ALARM { ptime GLOBAL hr GLOBAL ptime EXEC
[ 50 50 50 50 60 70 80 90 0 0 0 0 0 0 0 0 0 90 90 80 70 60 50 50 ]
hr_arr = hr_arr hr GET tm = tm DIMROOM
12000 ME SETALARM
}


This will dimm the room according to the time.