I'm trying to get an apple script to set the mouse tracking speed in OS X 10.6, specifically with a new Magic Mouse.
I've found the following:
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 1 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
But it seems to be built for 10.5 as I get an error when trying to 'set value of slider 1 to trackingValue'
2 questions...
- How can I get this to work with the 10.6/Magic Mouse combo?
- How would I go about getting the name of the slider on the control panel, or any other control for that matter, for use in applescript?