Skip to content

Instantly share code, notes, and snippets.

@souhaiebtar
Last active March 25, 2018 14:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save souhaiebtar/1fecf53f06212467e68279b2eebb4a74 to your computer and use it in GitHub Desktop.
Save souhaiebtar/1fecf53f06212467e68279b2eebb4a74 to your computer and use it in GitHub Desktop.
System Preferences > Trackpad > Point & Click > "Tap to Click" is disabled even if the checkbox corresponding to it is checked, to fix it i created an apple script that enable it and if it's already enabled it than it unchecked and checked it again
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.trackpad"
end tell
tell application "System Events"
tell process "System Preferences"
repeat until exists tab group 1 of window "Trackpad"
end repeat
tell tab group 1 of window "Trackpad"
click radio button "Point & Click"
end tell
set theCheckbox to checkbox 2 of tab group 1 of window "Trackpad"
tell theCheckbox
set checkBoxStatus to value of theCheckbox as boolean
if checkBoxStatus is false then
click theCheckbox
else
click theCheckbox
click theCheckbox
end if
# Set to "if checkBoxStatus is true" to disable
end tell
end tell
end tell
tell application "System Preferences"
quit
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment