【发布时间】:2022-11-28 09:33:40
【问题描述】:
我正在尝试使用 applescript 读取请勿打扰或 dnd 的状态。
出于某种原因,无论 dnd 是开还是关,它总是返回“1”。
do shell script "defaults -currentHost read ~/Library/Preferences/ByHost/com.apple.notificationcenterui doNotDisturb"
堆 编辑器:用于创建和运行脚本的脚本编辑器 操作系统:macOS Monterey
【问题讨论】:
-
仅供参考,我也尝试过没有 com.apple.notificationcenterui 的完整路径
标签: macos shell applescript macos-monterey do-not-disturb