Automatic Graphics Switching using AppleScript.
Hello,
I've tried a bunch of scripts, it doesn't seem to be working.
tell application "System Preferences"
if it is running then
quit
delay 0.5
end if
end tell
tell application "System Preferences"
set current pane to pane id "com.apple.preference.energysaver"
end tell
tell application "System Events"
tell process "System Preferences"
(the problem lies here)
end tell
end tell
To toggle that automatic graphics switching checkbox, what logic should be written for Mac 10.14 that is, because most of the solutions I've come across are for 10.8 or below.
MacBook Pro with Touch Bar