title: Is it possible for an Applescript to dim/up 0%/100% screen brightness on OSX 10.9 Mavericks when connected to external display?
body: <p>Previously, this could be done with an Applescript on Mountain Lion. This is because it targets System Preferences to adjust the brightness. System Preferences no longer has this setting in OSX 10.9 Mavericks. Any guidance on this issue would be appreciated. Thanks.<img src="https://i.stack.imgur.com/SHked.png" alt="brightness external display"></p>
  
  <p>Correction, my projector is plugged in all of the time so when the script is run, it jumps to the "projector" pane instead of the "built-in display" pane where the slider is located.
  I was thinking something like this would target the "Built-in Display" pane that has the slider. I can't seem to get it to work though.</p>
  
  <pre><code>    tell application "System Preferences"
          reveal anchor "displaysDisplayTab" of pane id         "com.apple.preference.displays"
          tell application "System Events" to tell process "System Preferences" to         tell window "Built-in Retina Display"
              delay 1
              set value of slider 1 of group 1 of tab group 1 of window 1 of         process "System Preferences" to 0
  
          end tell
          quit
      end tell
  </code></pre>