Script to reenable Trackpad zoom

trackpad
#1

Hi together,
We all know the bug when the trackpad suddenly stops allowing to zoom in/out or to use the smart zoom (here or here and here). And apparently toggling the "zoom in & out" function in the trackpad settings solves the problem for a while. So I made this apple Script as a temporal solution.

try
tell application "System Preferences"
	set current pane to pane "com.apple.preference.trackpad"
end tell

tell application "System Events"
		tell process "System Preferences"
			click radio button "Scroll & Zoom" of tab group 1 of window "Trackpad"
			click checkbox 2 of tab group 1 of window "Trackpad"
			click checkbox 3 of tab group 1 of window "Trackpad"
			click checkbox 2 of tab group 1 of window "Trackpad"
			click checkbox 3 of tab group 1 of window "Trackpad"
		end tell
	end tell
	tell application "System Preferences"
		quit
	end tell
end try

Just leave this Apple Script in an action you trigger when the problem appears and it should -hopefully- be fine. Couldn't test it though for now because (of course) the problem didn't appear since, but as it just does what I do normally I don't see any problems :man_shrugging:t2:
Just keep in mind that the script quits the System Preferences after…

Have a great day you all!
~Caliguvara

@Mio
@Hayden
@cubflyer
@yuuiko (as I saw in the comments that you have the same bug)

0 Likes

#2

I guess you got it first :stuck_out_tongue:

I was going to make one that didn’t open the sysprefs window and just did it in the background every so often, but havent got up to it yet (and I don’t know if this is possible either)

1 Like

#3

It should be, but probably rather with shell than Apple script, but I would have to dig deeper into it as I understand shell even less than Apple Script.. I'll try to figure out how this works after the exams in two weeks (damn I feel like I have them all the time), and if so post an update here. :slightly_smiling_face:

1 Like

#4

If you feel adventurous you can try this terminal command with the latest alpha:

defaults write com.hegenberg.BetterTouchTool BTTAutomaticallyRefreshPinches YES

It should automatically bring back the pinches, but I'm not yet sure about any side effects

1 Like

#5

Thanks for the reply but I've tried both, the apple script and the terminal command one, but neither have worked so far.

0 Likes

#6

Yeah, I also discovered that sometimes it needs to be run twice, or you have to change the application, run it, and when you come back it works. :confused: Unfortunately this is the best I can offer for now.

1 Like