1
私はこのプラクティスヘッドセットにオーディオ入出力を設定するこのスクリプトを持っていますが、デバイスがプラグインされていないとエラーになります。私はそれはそれはオーディオの設定内で検出されていない場合デバイスが存在する場合AppleScriptのオーディオ入出力セット
「でデバイスをプラグイン」
を言って、テキストを返す必要があります。ここで
はスクリプトです:
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" tell table 1 of scroll area 1 of tab group 1 of window 1 select (row 1 where value of text field 1 is "Plantronics C725") end tell end tell tell application "System Preferences" to activate tell application "System Preferences" reveal anchor "output" of pane id "com.apple.preference.sound" end tell tell application "System Events" to tell process "System Preferences" tell table 1 of scroll area 1 of tab group 1 of window 1 select (row 1 where value of text field 1 is "Plantronics C725") end tell end tell