Last active
September 16, 2019 08:41
-
-
Save wtser/5d3505c1d93d7a89f955b2ff77bd6238 to your computer and use it in GitHub Desktop.
DND auto for Mac
This file contains 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
# 在系统快捷键中 将打开关闭DND的快捷键设置为 cmd+shift+option+control+d | |
repeat while true | |
ignoring application responses | |
tell application "System Events" to keystroke "D" using {command down, shift down, option down, control down} | |
end ignoring | |
say "DND opened" | |
delay 1500 | |
ignoring application responses | |
tell application "System Events" to keystroke "D" using {command down, shift down, option down, control down} | |
end ignoring | |
say "DND closed" | |
delay 300 | |
end repeat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment