Unable to access Night Shift tab within Displays using Apple Scripts

Hi


I had written an apple script to open the night shift tab within system settings.

However this script no longer works with OS Ventura, :/ really apple?


I would like to ask someone if they can help me modify the script so that I can open the night shift tab using these new system settings. I am not proficient in writing apple scripts, and had hacked the older version together using code I found online. Here is the old script.


on run {input, parameters}
	
	tell application "System Settings"
		activate
		reveal anchor "displaysNightShiftTab" of pane id "com.apple.preference.displays"
		delay 1
	end tell
	
	tell application "System Events."
	tell process "System Preferences"
			click button 2 of group 1 of window 1
		end tell
	end tell
	
	return input
end run

MacBook Air 13″

Posted on Nov 12, 2022 8:37 AM

Reply

Similar questions

3 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Unable to access Night Shift tab within Displays using Apple Scripts

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.