Posts Tagged ‘visual’
Flashing the screen on Mac OS X
Here’s one way. There’s a C program to adjust the screen’s brightness written by Nicholas Riley, also available from this blog post by Matt (Danger) West. Get it. The rest is obvious. For instance, here’s a Python script, which should have probably been written in Perl:
import os, re, time s = os.popen('./brightness -l').read() ob = re.findall('brightness (\d.\d+)', s)[0] w = 0.2 for i in range(10): os.system('./brightness 0'); time.sleep(w) os.system('./brightness 1'); time.sleep(w) if(i==4): os.system("say beep") os.system('./brightness ' + ob)
Tune parameters to avoid epileptic seizures.