Last active
December 10, 2015 13:58
-
-
Save st44100/4444371 to your computer and use it in GitHub Desktop.
Mac Bookでトラックパッド、タップしてクリックを設定するApple Script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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