Created
October 4, 2016 15:10
-
-
Save mgarciate/ddf731c4bcdeea316c4321d2f3f1be67 to your computer and use it in GitHub Desktop.
Mute mac for n seconds through 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
| //Code to mute and unmute macs for n seconds through Applescript Editor | |
| set volume with output muted | |
| set startDelayDate to (time of (current date)) | |
| global shouldRepeat | |
| set shouldRepeat to yes | |
| repeat while shouldRepeat is equal to yes | |
| delay (1) | |
| if (((time of (current date)) - startDelayDate) ≥ 50) then | |
| set shouldRepeat to no | |
| end if | |
| end repeat | |
| set volume without output muted |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment