Trackpad Zoom Fix with AppleScript
Sometimes the trackpad zoom just stops working. I have to go to System Preferences - Trackpad to uncheck and recheck the zoom feature.
I wrote this script automation (JavaScript) to do that automatically. I attached this to a BetterTouchTool gesture (fn + pinch in) to quickly fix this when zooming fails me.
Hope this issue gets fixed soon.
sp = Application("System Preferences")
pane = Application("System Preferences").panes.byId("com.apple.preference.trackpad")
sp.reveal(pane)
paneContent = Application("System Events").applicationProcesses.byName("System Preferences").windows.byName("Trackpad").tabGroups.at(0)
paneContent.radioButtons.byName("Scroll & Zoom").click()
checkbox = paneContent.checkboxes.at(1)
if (checkbox.value()) {
checkbox.click()
}
checkbox.click()
sp.quit()
MacBook Pro with Touch Bar