Skip to content

Instantly share code, notes, and snippets.

@jletourneau
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jletourneau/1951170b25382031dfb5 to your computer and use it in GitHub Desktop.
Save jletourneau/1951170b25382031dfb5 to your computer and use it in GitHub Desktop.
Timed mute AppleScript
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