Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Quickly Enable/Disable natural scrolling on OSX
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
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.
@elantanzer

This comment has been minimized.

Copy link

commented Oct 22, 2015

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?

@somerandomnerd

This comment has been minimized.

Copy link
Owner Author

commented Dec 28, 2016

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
You can’t perform that action at this time.