Originally Posted By: Richard H.
 Quote:
Ehm, a new lamp doesn't get hot when u screw it in....


It does if you forgot to switch it off before you change it, which is why we then have "$S.Toggle" before we continue.


Might I suggest $S.Toggle(0) for turning off then \:\)
Btw shouln't
 Code:
$O=GetObject("Lamp:/"+$R)
$S=GetObject("Switch:/"+$R)

actually be:
 Code:
$O=GetObject("Lamp://"+$R)
$S=GetObject("Switch://"+$R)


Edited by apronk (2007-07-19 05:48 PM)