r/applescript • u/Lawdie123 • Aug 18 '23
Change mouse tracking via Applescript
I'm having issues making a "simple" script that opens up the mouse setting tab, sets the tracking value to 0.6875 then sets it to 0.5 stright after.
I've managed to get it to open the Mouse tab but I can't figure out how to interact with the slider, I would have done it via shell/bash but that requires you to reboot the machine for it to apply.
tell application "System Settings"
activate
reveal pane id "com.apple.Mouse-Settings.extension"
end tell
5
Upvotes
View all comments
Show parent comment
1
u/copperdomebodha Aug 18 '23
Yes, calling this twice would resolve the tracking speed change. But calling it once with the desired value should be sufficient. The application-altered tracking speed should not match your desired value and so this code should reset it to the desired value.