Cortando código de varias fuentes y llegué a este monstruo, pero soy incapaz de conseguir que seleccione el panel de teclas de función. La casilla funciona si la selecciono manualmente.
Gracias de antemano por cualquier ayuda.
do shell script "open -b com.apple.systempreferences " & ¬
"/System/Library/PreferencePanes/Keyboard.prefPane"
tell application "System Events"
tell its application process "System Settings"
click button 1 of group 2 of scroll area 1 of group 1 of group 2 ¬
of splitter group 1 of group 1 of window "Keyboard"
delay 0.1
click UI element 1 of row 11 of outline 1 of scroll area 1 of group 1 of splitter group 1 of group 1 of sheet 1 of window "Keyboard"
delay 0.1
repeat until checkbox "Use F1, F2, etc. keys as standard function keys" of group 1 of scroll area 1 of group 2 of splitter group 1 of group 1 of sheet 1 of window "Keyboard" exists
end repeat
click checkbox "Use F1, F2, etc. keys as standard function keys" of group 1 of scroll area 1 of group 2 ¬
of splitter group 1 of group 1 of sheet 1 of window "Keyboard"
end tell
end tell
Concretamente es esta línea la que no funciona:
click UI element 1 of row 11 of outline 1 of scroll area 1 of group 1 of splitter group 1 of group 1 of sheet 1 of window "Keyboard"