Last active
November 7, 2022 19:25
-
-
Save lfender6445/d8361e084057214798a1ccb0cbea32ac to your computer and use it in GitHub Desktop.
AppleScript - Switch to hardware mic
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
-- Force mac book pro 10.13.3 to switch audio input to hardware mic | |
tell application "System Preferences" to activate | |
tell application "System Preferences" | |
reveal anchor "input" of pane id "com.apple.preference.sound" | |
end tell | |
tell application "System Events" to tell process "System Preferences" | |
select (row 1 of table 1 of scroll area 1 of tab group 1 of window "Sound" whose value of text field 1 is "Internal Microphone") | |
end tell | |
quit application "System Preferences" |
@lfender6445 Thanks for the help. I used FastScript and mapped a keyboard shortcut to the script. Otherwise, it's a big pain since every time I pair the airpods I have to do it again. Thanks for the help tho :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@mustafc you need a way too run apple scripts (save it as a .scpt file first)
have a read through https://www.techradar.com/how-to/computing/apple/terminal-101-running-applescripts-from-the-terminal-1305736