Skip to content

Instantly share code, notes, and snippets.

@kilsey
Created May 24, 2019 14:30
Show Gist options
  • Save kilsey/f89a46982d7143685ce4d596560b696f to your computer and use it in GitHub Desktop.
Save kilsey/f89a46982d7143685ce4d596560b696f to your computer and use it in GitHub Desktop.
Microphone Input Volume Control Applescript
-- Applescript I use to control my microphone during calls/recording
-- This toggles the input volume from 100 to 0 (or vice versa) and displays a notification
-- I trigger this in Keyboard Maestro via a hotkey and it is followed w/ a "Ding" sound
set inputVolume to input volume of (get volume settings)
if inputVolume = 0 then
set inputVolume to 100
display notification "The microphone is now live" with title "Shush" subtitle "Microphone control"
else
set inputVolume to 0
display notification "The microphone is now muted" with title "Shush" subtitle "Microphone control"
end if
set volume input volume inputVolume
delay 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment