gpt4 book ai didi

macos - AppleScript更改音频MIDI设置

转载 作者:行者123 更新时间:2023-12-03 00:35:24 27 4
gpt4 key购买 nike

快速简单的AppleScript问题。
我需要有一个Applescript来勾选“音频MIDI设置”应用程序中的复选框。我对applescript完全陌生。
该对话框如下所示,我需要选中第二个复选框。

Audio MIDI Setup window

有什么提示吗?

谢谢!

最佳答案

我自己的系统音频设备中没有“Soundflower”,所以我不知道我能获得确切的值来完全按照所需的方式创建AppleScript。但是,此脚本将选中“内置输出”的第二个复选框。

enter image description here

这是完成此任务的脚本:

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

关于macos - AppleScript更改音频MIDI设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42053743/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com