AppleScript 更改音频 MIDI 设置
AppleScript to change Audio MIDI Settings
快速简单的 AppleScript 问题。
我需要一个 applescript 来勾选音频 MIDI 设置应用程序中的复选框。我是 applescript 的新手。
对话框如下所示,我需要选中第二个复选框。
有什么提示吗?
谢谢!
我自己的系统音频设备中没有 "Soundflower",所以我不知道我能否获得确切的值来完全按照您需要的方式创建 AppleScript。但是,此脚本将 select "Built In Output" 的第二个复选框。
这是完成此任务的脚本:
tell application "Audio MIDI Setup"
activate
end tell
delay 2
try
tell application "System Events"
tell process "Audio MIDI Setup"
select row 2 of outline 1 of scroll area 1 of splitter group 1 of window "Audio Devices"
-- change the value in the beginning of that line from "select row 2" to "select row 3" This should select the "Soundflower Output Devicee"
click checkbox 1 of UI element 4 of row 3 of outline 1 of scroll area 1 of tab group 1 of splitter group 1 of window "Audio Devices"
end tell
end tell
end try
快速简单的 AppleScript 问题。 我需要一个 applescript 来勾选音频 MIDI 设置应用程序中的复选框。我是 applescript 的新手。 对话框如下所示,我需要选中第二个复选框。
有什么提示吗?
谢谢!
我自己的系统音频设备中没有 "Soundflower",所以我不知道我能否获得确切的值来完全按照您需要的方式创建 AppleScript。但是,此脚本将 select "Built In Output" 的第二个复选框。
这是完成此任务的脚本:
tell application "Audio MIDI Setup"
activate
end tell
delay 2
try
tell application "System Events"
tell process "Audio MIDI Setup"
select row 2 of outline 1 of scroll area 1 of splitter group 1 of window "Audio Devices"
-- change the value in the beginning of that line from "select row 2" to "select row 3" This should select the "Soundflower Output Devicee"
click checkbox 1 of UI element 4 of row 3 of outline 1 of scroll area 1 of tab group 1 of splitter group 1 of window "Audio Devices"
end tell
end tell
end try