Last active
October 13, 2022 15:37
-
-
Save somerandomnerd/f1986f104c1cc83160b3 to your computer and use it in GitHub Desktop.
Quickly Enable/Disable natural scrolling on OSX
This file contains hidden or 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.trackpad" | |
end tell | |
tell application "System Events" | |
tell process "System Preferences" | |
click radio button "Scroll & Zoom" of tab group 1 of window "Trackpad" | |
set theCheckbox to checkbox 1 of tab group 1 of window "Trackpad" | |
tell theCheckbox | |
set checkBoxStatus to value of theCheckbox as boolean | |
if checkBoxStatus is false then click theCheckbox | |
# Set to "if checkBoxStatus is true" to disable | |
end tell | |
end tell | |
end tell | |
tell application "System Preferences" | |
quit | |
end tell |
This file contains hidden or 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
For some reason, Powerpoint for the Mac occasionally goes crazy and scrolls between slides erratically. | |
For some reason, disabling natural scrolling seems to stop this from happening. | |
This is an AppleScript (which I use Keyboard Maestro to trigger - you could probably do something with Automator and have a Service set up for it) to quickly enable/disable natural scrolling, so that Powerpoint doesn't drive me quite as crazy. |
Sorry for the very late reply, but if you swap each instance of "trackpad" for "mouse", and swap "Scroll & Zoom" for "Point & Click" then I think it ought to do the job. (All this script does is open up System Preferences and unselects the relevant checkbox - there isn't any behind-the-scenes magic going on.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for posting your solution. It's the closest thing to a solution I've found yet. I'm having trouble with this, though, as the Trackpad preferences won't recognize my magic mouse as the track pad. It fails with an error about not finding a trackpad. Any suggestions?