Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Possible to change mouse sensitivity with automator?

For regular computing, I use my magic mouse. For gaming, I use a different mouse with more controls.


Each time I switch between mice, I have to change the mouse sensitivity under system preferences. I'd like to autmoate this with a hot key. Possible to do with automator?

iMac, Mac OS X (10.6.8)

Posted on Jul 23, 2011 7:34 AM

Reply
Question marked as Best reply

Posted on Jul 23, 2011 9:23 AM

OK, found a nifty applescript for this. Just change the 5 in the first line to 0-9, depending on what you want to set the mouse sensitivity to be. I created another script which increases mouse sensitivity. Then I created a hotkey combination to change my mouse sensitivity settings very quickly based on which mouse I'm using.


If you don't know how to set this script up, follow the instructions in this helpful comment here: https://discussions.apple.com/thread/2488007?start=0&tstart=0. But instead of having the application run in just iTunes, as the comment suggests, have it run in "all applications."


Here's the script:


set trackingValue to 5
--Open and activate System Preferences
tell application "System Preferences" to activate
--Attempt to change settings using System Events
tell application "System Events"
tell process "System Preferences"
try
--Open the "Keyboard & Mouse" pane
click menu item "Mouse" of menu "View" of menu bar 1
delay 2
set value of slider "Tracking Speed" of window "Mouse" to trackingValue
--end tell
on error theError
--An error occured
display dialog ("Sorry, an error occured while altering Keyboard and Mouse settings:" & return & theError) buttons "OK" default button "OK"
end try
end tell
end tell
3 replies
Question marked as Best reply

Jul 23, 2011 9:23 AM in response to nysus

OK, found a nifty applescript for this. Just change the 5 in the first line to 0-9, depending on what you want to set the mouse sensitivity to be. I created another script which increases mouse sensitivity. Then I created a hotkey combination to change my mouse sensitivity settings very quickly based on which mouse I'm using.


If you don't know how to set this script up, follow the instructions in this helpful comment here: https://discussions.apple.com/thread/2488007?start=0&tstart=0. But instead of having the application run in just iTunes, as the comment suggests, have it run in "all applications."


Here's the script:


set trackingValue to 5
--Open and activate System Preferences
tell application "System Preferences" to activate
--Attempt to change settings using System Events
tell application "System Events"
tell process "System Preferences"
try
--Open the "Keyboard & Mouse" pane
click menu item "Mouse" of menu "View" of menu bar 1
delay 2
set value of slider "Tracking Speed" of window "Mouse" to trackingValue
--end tell
on error theError
--An error occured
display dialog ("Sorry, an error occured while altering Keyboard and Mouse settings:" & return & theError) buttons "OK" default button "OK"
end try
end tell
end tell

Oct 5, 2015 9:52 PM in response to nysus

Works on Yosemite using:

tell application "System Preferences"
activate reveal anchor "mouseTab" of pane id "com.apple.preference.mouse" tell application "System Events" tell application process "System Preferences" set value of slider 3 of window "Mouse" to 7 end tell end tell quit end tell

Change the value "7" to your desired sensitivity.

Possible to change mouse sensitivity with automator?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.