Tengo un macbook M1 Max 2021, 1tb, 64gb ram, con mac os 13.1 ventura y mi HDR siempre se apaga aleatoriamente cuando mi ordenador se despierta del reposo. Mis monitores son dell s3422dwg y dell s2721dgf.
Mis externos son el 1 y el 3 mientras que mi interno es el monitor 2.
Tengo que ir al menú y buscar los monitores y activar el control deslizante hdr.
Estoy intentando escribir un script de apple que pueda habilitar HDR en los monitores externos sin afectar a mi monitor retina interno. La pantalla interna sólo puede activar o desactivar tru tones no hdr.
Esto es lo que tengo hasta ahora, pero me sigo encontrando con un error de fin de línea.
tell application "System Preferences"
activate
reveal anchor "displaysDisplayTab" of pane id "com.apple.preference.displays"
tell anchor "displaysDisplayTab" of pane id "com.apple.preference.displays"
tell table 1 of scroll area 1
select (row whose value of static text 1 contains "DELL S3422DWG")
end tell
tell table 1 of scroll area 1
select (row whose value of static text 1 contains "DELL S2721DGF")
end tell
click checkbox "High Dynamic Range" of group 1
end tell
quit
end tell
Luego también intenté hacerlo de otra manera como esta,
tell application "System Settings"
activate
set current pane to pane id "com.apple.preference.displays"
end tell
tell application "System Events"
tell process "System Preferences"
set frontmost to true
repeat until exists window "Displays"
end repeat
tell scroll area 1 of group 1 of window "Displays"
click checkbox "High Dynamic Range"
end tell
end tell
end tell
tell application "System Settings"
quit
end tell
Pero la aplicación de preferencias del sistema se abre en la pestaña de apariencia y me arroja un error error "System Settings got an error: AppleEvent handler failed." number -10000
.
Acabo de empezar a usar apple script y no estoy muy seguro de lo que estoy haciendo. Cualquier ayuda sería muy apreciada. Gracias.