jtn*_*ire 12 applescript automator osx-lion macos
众所周知(谁拥有 Mac OS X Lion),默认情况下,滚动是反转的,使其有点像 iPhone。
问题:USB 鼠标无法实现“正常滚动”,触控板无法实现“自然/反向”滚动。该设置(即使它在鼠标和触控板设置中都列出)适用于两者。
问题:请有 Automator 或 AppleScipting 经验的人给我一些关于如何制作可以切换倒置设置的快捷方式的提示吗?我需要这个,因为当我在家时,我的 Mac Book Air 已插入我的键盘、鼠标和显示器,我想要一种快速更改此设置的方法
小智 3
这应该可以做到:
tell application "System Preferences" to set the current pane to "com.apple.preference.mouse"
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
Run Code Online (Sandbox Code Playgroud)
最终工作解决方案:
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"
click checkbox 1 of tab group 1 of window "Trackpad"
end tell
end tell
tell application "System Preferences"
quit
end tell
Run Code Online (Sandbox Code Playgroud)