daily pastebin goal
64%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. try
  2.     set logitech to "Logitech"
  3.     set scriptOutput to do shell script "system_profiler SPUSBDataType | grep -i logitech"
  4.     if scriptOutput contains logitech then
  5.         tell application "System Preferences"
  6.             activate
  7.             set current pane to pane "com.apple.preference.trackpad"
  8.         end tell
  9.         delay 2
  10.         tell application "System Events"
  11.             tell process "System Preferences"
  12.                 set checkBoxOne to checkbox 1 of tab group 1 of window "Trackpad"
  13.                 click radio button "Scroll & Zoom" of tab group 1 of window "Trackpad"
  14.                 tell checkBoxOne to if value is 1 then click
  15.             end tell
  16.         end tell
  17.     else
  18.         tell application "System Preferences"
  19.             activate
  20.             set current pane to pane "com.apple.preference.trackpad"
  21.         end tell
  22.         delay 2
  23.         tell application "System Events"
  24.             tell process "System Preferences"
  25.                 set checkBoxOne to checkbox 1 of tab group 1 of window "Trackpad"
  26.                 click radio button "Scroll & Zoom" of tab group 1 of window "Trackpad"
  27.                 tell checkBoxOne to if value is 0 then click
  28.             end tell
  29.         end tell
  30.     end if
  31. end try
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top