
Set cbValue to value of (click checkbox 1 of front window of application process "System Preferences") as boolean # The 'Scroll direction: Natural' checkbox is checked, uncheck it. Set isChecked to get value of checkbox 1 of front window of application process "System Preferences" as boolean delay 0.5 - # If necessary, uncomment 'delay' command and set its value in seconds and or decimal fractions there of.
#Automator mac scroll direction code#
When run, it toggles the state of the Scroll direction: natural checkbox between checked and unchecked along with the slider settings under each state.ĪppleScript code for the Toggle Mouse Settings app: on run I saved the following AppleScript code in Script Editor as an application named Toggle Mouse Settings in the Applications folder. The comments in the code below should be adequate, however, don't hesitate to ask it you need anything explained. You can comment out or remove any slider that's not going to be changed by the code below. You will then plug in the values, gathered above, in the code below. Then run the code again to get the differential settings. Then make the setting changes that you want to the sliders for the opposite state of what it was when you gathered the values of the first settings for the first state. The code above will be run once to get the current value settings of the sliders. There will be two difference states of the Scroll direction: natural checkbox in System Preferences > Mouse, checked and unchecked and the change in slider settings between the two states. Log "Tracking speed is set to: " & value in (get properties of slider 3 of front window of application process "System Preferences") Log "Double-Click speed is set to: " & value in (get properties of slider 2 of front window of application process "System Preferences") Log "Scrolling speed is set to: " & value in (get properties of slider 1 of front window of application process "System Preferences")

delay 0.5 - # If necessary, uncomment 'delay' command and set its value in seconds and or decimal fractions there of. Open Script Editor and create a new document, then add the following code: tell application "System Preferences" This answer is going to use AppleScript to get the before and after settings for the value of the aforementioned listed sliders to be used in the AppleScript code that follows after this code.
#Automator mac scroll direction software#
Under macOS Sierra, if you have only a normal USB mouse, not one that comes with it's own software and is multi-function with additional buttons, etc., then in System Preferences > Mouse, you have the following settings that can be changed:Īnd two additional settings under Mouse that will not be addressed, for two reasons, the Primary mouse button: radio buttons, if other then the default of Left, is in all likelihood already set and wouldn't necessarily change because one wants to change the Scroll direction: natural checkbox, and since the OP stated USB mouse, I'll assume is not using Bluetooth and can ignore the Setup Bluetooth Mouse.
