I’m a totally new to applescripting. I’m trying to fix the code below that changes the sensitivity of my mouse in system preferences. It’s these two lines that don’t work:
=======
click menu item “Mouse” of menu “View” of menu bar 1
delay 2
set value of slider “Tracking Speed” of window “Mouse” to trackingValue
Heres’ the entire 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
Model: iMac Lion
AppleScript: Whatever comes with Lion
Browser: Chrome
Operating System: Other