Created
October 9, 2015 12:33
-
-
Save kitallis/884c39a88cae697249ad to your computer and use it in GitHub Desktop.
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
on run {input, parameters} | |
set inputVolume to input volume of (get volume settings) | |
set curVolume to (get volume settings) | |
if (inputVolume = 0 and (output muted of curVolume is false)) then | |
set inputVolume to 100 | |
set volume with output muted | |
set displayNotification to "Microphone on, speakers off" | |
else if (inputVolume > 0 and (output muted of curVolume is true)) then | |
set inputVolume to 0 | |
set volume without output muted | |
set displayNotification to "Microphone off, speakers on" | |
else if (inputVolume = 0 and (output muted of curVolume is true)) then | |
set inputVolume to 100 | |
set volume without output muted | |
set displayNotification to "Microphone on, speakers on" | |
else if (inputVolume > 0 and (output muted of curVolume is false)) then | |
set inputVolume to 0 | |
set volume with output muted | |
set displayNotification to "Microphone off, speakers off" | |
end if | |
set volume input volume inputVolume | |
display notification displayNotification | |
return input | |
end run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment