So this is not really an AppleScript question, but…
Does anyone here know of a terminal command to decrease your screen brightness intensity? I frequently remote into my work iMac from home and when I do the screen comes on and activates my security camera. My camera sees the change in light and thinks it is movement. I have my camera to start emailing me images once it detects movement. It is a bit annoying.
I would like a terminal command I can send my iMac to dim my screen via ARD before logging in. This way my camera no longer freaks out.
Here is my workaround to control brightness of the screen.
Go to Keyboard preferences and set the checkbox Use F1,F2,etc. as standard function keys.
Run this:
tell application "System Events"
key down 63 -- holding Fn key
repeat 5 times
-- gradually decreaze the brightness
key code 145 -- to increaze, use 144
end repeat
key up 63
end tell