Last active
December 13, 2021 21:36
-
-
Save ofenstichloch/1fff1d6ff00802a087be5f06f4a2e8e6 to your computer and use it in GitHub Desktop.
Simple applescript to toggle the trackpad on a macbook on and off. This script uses the "Turn off Trackpad when USB Mouse is connected" feature of Mac OS. Tested on 10.12.6
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 Events" | |
tell process "System Preferences" | |
try | |
set visible to false | |
end try | |
tell application "System Preferences" | |
delay 1 | |
reveal pane id "com.apple.preference.universalaccess" | |
end tell | |
delay 1 | |
get entire contents of window "Accessibility" | |
select row 15 of table 1 of scroll area 1 of window "Accessibility" | |
click checkbox 2 of tab group 1 of group 1 of window "Accessibility" of application process "System Preferences" of application "System Events" | |
end tell | |
end tell | |
quit application "System Preferences" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you so much, I have Catalina 10.15.17 maybe that's why you need 15 and I need 14, anyways very useful I couldn't find a way to make it work other than messing around with the SQLite file which has the preferences stored in it, that delay also is a great idea!