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
2
u/Lawdie123 Aug 18 '23
Great ill give it a bash, in my case I assume I'll need to call Mouse_TrackingSpeed() twice and the value is the number on the slider 0.5 is the 3rd notch and 0.68 is the 4th
Mouse_TrackingSpeed(4) then Mouse_TrackingSpeed(3)
For some reason whenever I restart a certain program is screws my tracking speed up and I have to move it from the current setting and back again for it to reapply.
Thanks!