【问题标题】:AppleScript to change Audio MIDI SettingsAppleScript 更改音频 MIDI 设置
【发布时间】:2017-02-05 15:25:45
【问题描述】:

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

有什么提示吗?

谢谢!

【问题讨论】:

  • 你能准确解释一下“我需要检查第二个复选框”是什么意思吗?我看到的唯一“复选框”直接位于静音标签下方。有些东西告诉我这不是你要找的。​​span>
  • 这正是静音标签下的那些复选框。

标签: macos audio applescript settings midi


【解决方案1】:

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



以下是完成此任务的脚本:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-12-15
    • 2012-01-23
    • 2021-11-19
    • 1970-01-01
    • 2017-12-31
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多