Created
March 15, 2013 22:51
-
-
Save sofakartoffel/5173767 to your computer and use it in GitHub Desktop.
change the behavior of function keys (F1, F2, ...)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "System Preferences" | |
activate | |
set current pane to pane "com.apple.preference.keyboard" | |
end tell | |
tell application "System Events" | |
-- If we don't have UI Elements enabled, then nothing is really going to work. | |
if UI elements enabled then | |
tell application process "System Preferences" | |
get properties | |
click radio button "Tastatur" of tab group 1 of window "Tastatur" | |
click checkbox "Die Tasten F1, F2 usw. als Standard-Funktionstasten verwenden" of tab group 1 of window "Tastatur" | |
end tell | |
tell application "System Preferences" to quit | |
else | |
-- GUI scripting not enabled. Display an alert | |
tell application "System Preferences" | |
activate | |
set current pane to pane "com.apple.preference.universalaccess" | |
display dialog "Bitte \"Zugriff für Hilfsgeräte aktivieren\"" | |
end tell | |
end if | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment