I'm currently writing an applescript to use as an alarm clock (playing itunes at full blast, displaying my dashboard with the weather and news), but of course, to actually get to sleep I have had to turn the brightness of the monitor right down, which means that I have to manually turn it back up again.
The Script I am currently using is
But this returns the error "System Events got an error: Can't set window "Color LCD" of process "System Processes" to 0.5"
any ideas what I am doing wrong?
The Script I am currently using is
Code:
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.displays"
tell application "System Events"
delay 5
set value of slider 1 of group 2 of tab group 1 of window "Color LCD" of process "System Preferences" to 0.5
delay 5
end tell
quit
end tell
But this returns the error "System Events got an error: Can't set window "Color LCD" of process "System Processes" to 0.5"
any ideas what I am doing wrong?