Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As everyone will know (who has Mac OS X Lion), by default, scrolling is inverted to make it a bit like the iPhone.

Problem: There is no way to have "normal scrolling" for a USB mouse, and "natural/inverted" scrolling for the trackpad. The setting (even though it is listed in both the mouse and trackpad settings) applies to both.

Question: Could someone, who is experienced with Automator or AppleScipting, please give me a few tips on how to make a shortcut that can toggle the inverted setting? I need this as when I'm at home, I have my Mac Book Air plugged to my Keyboard, Mouse and Monitor, and I'd like a quick way to change this setting

share|improve this question

migrated from Aug 9 '11 at 18:40

This question came from our site for professional and enthusiast programmers.

Just curious, is opening Preferences not fast enough? – Evan Mulawski Aug 9 '11 at 17:59
I'm constantly docking and undocking my mac book, so a nice shortcut to change this would be nice. – jtnire Aug 9 '11 at 18:01
Why are people voting down this post? Is there something I have done wrong? – jtnire Aug 9 '11 at 18:06
up vote 3 down vote accepted

This ought to do it:

tell application "System Preferences" to set the current pane to ""
tell application "System Events"
    tell process "System Preferences"
        click radio button "Point & Click" of tab group 1 of window "Mouse"
        click the first checkbox
    end tell
end tell

Final Working Solution:

tell application "System Preferences"
    set current pane to pane ""
end tell

tell application "System Events"
    tell process "System Preferences"
        click radio button "Scroll & Zoom" of tab group 1 of window "Trackpad"
        click checkbox 1 of tab group 1 of window "Trackpad"
    end tell
end tell

tell application "System Preferences"
end tell
share|improve this answer
This is what I have so far: It says it can't find checkbox 1 – jtnire Aug 9 '11 at 18:27
...checkbox of group 1 try that. – fireshadow52 Aug 9 '11 at 18:32
"System Events got an error: Can’t get group 1 of process "System Preferences". Invalid index." – jtnire Aug 9 '11 at 18:34
Ok, this works: Any ideas on how I get the window to close? – jtnire Aug 9 '11 at 18:42
Ok: this is my final solution: – jtnire Aug 9 '11 at 18:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.