OSX 10.10.3, also reproducible on 10.8
The current state of audio input in System Preferences is:
- Input volume is set to 0
- When I speak into microphone I see no animation of the sound bar
Is it possible to recover audio input from that state in AppleScript?
Edition 1
Basically, this script doesn't work, the microphone stays muted, despite of the fact that the volume caret is set to maximum.
set volume input volume 100
Edition 2
The following AppleScript works:
tell application "System Events"
set volume input volume 100
end tell
tell application "System Preferences"
set current pane to pane id "com.apple.preference.sound"
end tell
tell application "System Events"
tell process "System Preferences"
set visible to false
click radio button "input" of tab group 1 of window "Sound"
perform action "AXIncrement" of slider 1 of group 2 of tab group 1 of window "Sound"
end tell
end tell
tell application "System Preferences"
quit
end tell
But unfortunately it cannot be executed without a permission from user to Accessibility (that requires relatively difficult actions from user).
Edition 3
I can consider a solution in any language: AppleScript, Objective-C, Java, C++.