How can I run a script when the room brightness has changed? How can I run a script when the room brightness has changed? In particular I want to run a script when the lights have been turned off in the room that my Macbook is in.
Lilt will do this.

http://www.jonn8.com/lilt/

I used to use it to change my desktop picture from a light to dark one  when the ambient light changed :D