I have to adjust the cursor sensitivity in SteerMouse every time I switch between my home mouse and my work mouse. Is there a way to do this programmatically?
You should check if SteerMouse supports applescript by opening applescript editor and then clicking File -> Open Dictionary. If it does, please reply back.
In the meantime, there is a indirect solution, which is to have two separate preferences files for work and home and switching between them.
First, set your home settings. You'll find the preferences file at ~/Library/Preferences/SteerMouse.prefs. Copy that and rename the copy to SteerMouse_home.prefs. Then adjust them for work and copy those preferences and name them SteerMouse_work.prefs.
Then, in applescript editor, copy this code and save it as an application.
property myLocation : "" if myLocation is "" then set myLocation to "Home" end if if myLocation is "Home" then do shell script "mv -f ~/Library/Preferences/SteerMouse_home.prefs ~/Library/Preferences/SteerMouse.prefs" set myLocation to "Work" else if myLocation is "Work" then do shell script "mv -f ~/Library/Preferences/SteerMouse_work.prefs ~/Library/Preferences/SteerMouse.prefs" set myLocation to "Home" end if #You'll only need this part if the app needs to be restarted for the changes to occur. tell application "SteerMouse" quit activate end tell
While @frediemathews answered the question, I wanted to post the code I ended up using.
SteerMouse saves its preferences instantly, so I adjusted the settings three times and copied the preference file each time. I have three AppleScripts which contain code like this:
tell application "SteerMouse Manager" to quit do shell script "cp ~/Misc/steermouse-prefs/fast ~/Library/Preferences/SteerMouse.prefs" tell application "SteerMouse Manager" to activate
(SteerMouse Manager is an application which is hidden inside SteerMouse.app)