У меня есть простые сценарии, чтобы уменьшить яркость моего MacBook через AppleScript. Это работало нормально в Catalina 10.15.3, но перестало работать после обновления до 10.15.4.
Сценарий выглядит следующим образом:
tell application "System Preferences"
reveal anchor "displaysDisplayTab" of pane "com.apple.preference.displays"
end tell
delay 0.5
tell application "System Events" to tell process "System Preferences" to tell window "Built-in Retina Display"
set value of value indicator 1 of slider 1 of group 1 of tab group 1 to 0.0
end tell
.. Ошибка выглядит следующим образом:
error "System Events got an error: Can’t get slider 1 of group 1 of tab group 1 of window \"Built-in Retina Display\" of process \"System Preferences\". Invalid index." number -1719 from slider 1 of group 1 of tab group 1 of window "Built-in Retina Display" of process "System Preferences"