1

I want to be able to print out if True Tone is on or off in a script. Is there a command to determine this?

2
0

You can try this, Source completely referenced from Reddit

tell application "System Preferences"
  if it is running then
    quit
  end if
end tell

delay 0.2

activate application "System Preferences"

tell application "System Events"
  tell process "System Preferences"
    click button "Displays" of scroll area 1 of window "System Preferences"
    delay 0.8
    click radio button "Display" of tab group 1 of window "Built-in Retina Display"
    click checkbox "True Tone" of tab group 1 of window "Built-in Retina Display"
  end tell
  quit application "System Preferences"
end tell

The other solution is:

use sys : application "System Events"
use prefs : application "System Preferences"

property prefsUI : a reference to process "System Preferences"
property _W : a reference to windows of prefsUI
property _TT : a reference to checkbox "True Tone" of tab group 1 of _W

property pane : "com.apple.preference.displays"
property anchor : "displaysDisplayTab"
property tab : anchor (my anchor) of pane id (my pane)

set TrueTone to null
if tab ≠ (reveal tab) then return null

tell _TT to if exists then set TrueTone to its value as boolean

quit prefs

TrueTone
2
  • How does this "print out if True Tone is on or off"?
    – nohillside
    Dec 23 '19 at 10:42
  • I think it flips it.
    – anki
    Dec 23 '19 at 10:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .