An AppleScript I use to auto adjust the brightness for iMacs stopped working when migrated to 10.12 Monterey. Any suggestions for a fix?
Here is the original script:

```tell application "System Preferences"
	if it is running then
		quit
	end if
end tell
delay 10.0
activate application "System Preferences"
tell application "System Events"
	tell process "System Preferences"
		click button "Displays" of scroll area 1 of window "System Preferences"
		delay 1
		click radio button "Display" of tab group 1 of window "Built-in Retina Display"
		set value of value indicator 1 of slider 1 of tab group 1 of window "Built-in Retina Display" to 0.57
	end tell
	quit application "System Preferences"
end tell
```

Right off the bat you can see the windows look different from the operating systems. I tried loosing "tab group 1" because I don't see tabs anymore. Also, I changed the name of the window from "Built-in Retina Display" to "Displays".[![enter image description here][1]][1]

[![enter image description here][2]][2]


  [1]: https://i.sstatic.net/lTzvc.jpg
  [2]: https://i.sstatic.net/CX8qr.jpg