Skip to content

Instantly share code, notes, and snippets.

@st44100
Last active December 10, 2015 13:58
Show Gist options
  • Save st44100/4444371 to your computer and use it in GitHub Desktop.
Save st44100/4444371 to your computer and use it in GitHub Desktop.
Mac Bookでトラックパッド、タップしてクリックを設定するApple Script
display alert "タップでクリックを設定" message "" buttons {"Cancel", "タップクリックOFF", "タップクリックON"} cancel button 1
if (button returned of result) is "タップクリックON" then
set theValue to 1
else
set theValue to 0
end if
-- open trackpad preferences
tell application "System Preferences"
activate
reveal (pane id "com.apple.preference.trackpad")
end tell
tell application "System Events"
tell process "System Preferences"
click radio button "ポイントとクリック" of tab group 1 of window "トラックパッド"
-- tap to click
tell checkbox 1 of tab group 1 of window "トラックパッド"
repeat until exists
delay 0.2
end repeat
if value is not theValue then click
end tell
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment