Last active
August 29, 2015 14:22
-
-
Save jletourneau/1951170b25382031dfb5 to your computer and use it in GitHub Desktop.
Timed mute AppleScript
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
global mute_time | |
global wait_complete | |
on run | |
display dialog "Mute for how many seconds?" default answer "120" | |
set mute_time to text returned of result as number | |
set volume with output muted | |
set wait_complete to 0 | |
end run | |
on idle | |
if wait_complete = 1 then | |
set volume without output muted | |
quit | |
else | |
set wait_complete to 1 | |
return mute_time | |
end if | |
end idle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment