Sorry, I got that you wanted the input volume, I just failed to word that comment a bit better. I was just looking at that code and thinking "it would push you to the right direction". Kinda like, if there is a piece of code that is like get window width
... and I wanted the height instead, then the logical step is probably get window height
.
I did come back to this before, but I thought someone answered this already...
Here are some examples of setting input volume.
You can find get volume settings
documentation here.
Input Volume
-- Get input volume
input volume of (get volume settings)
-- Set input volume
set volume input volume 40
-- Increment input volume (+)
set volume input volume ((input volume of (get volume settings)) + 5)
Output Volume
-- Get output volume
output volume of (get volume settings)
-- Set output volume
set volume output volume 40
-- Increment output volume (+)
set volume output volume ((output volume of (get volume settings)) + 5)
You can test these in the /Applications/Utilities/Script Editor.app
. If you stick this: return (get volume settings)
at the very end, after you've set volume levels, the result panel will give you the current values at the bottom of the window. Of course you could have the Sound preferences window open as well.
Input level
of the microphone.