【发布时间】:2021-11-06 08:44:10
【问题描述】:
您好,我正在尝试使用脚本从默认扩展坞中删除和添加几个特定应用程序。
tell application "System Events"
tell property list file "~/Library/Preferences/com.apple.dock.plist"
set value of property list item "Firefox.app" to null
end tell
end tell
这就是我所拥有的,它会引发错误
error "System Events got an error: Can’t set property list item \"Firefox.app\" of property list file \"/Users/immam.m/Library/Preferences/com.apple.dock.plist\" to null." number -10006 from property list item "Firefox.app" of property list file "/Users/immam.m/Library/Preferences/com.apple.dock.plist" to null
我还想找到一种将应用程序添加到阵列的方法,以便它在 KIllall 命令时显示在 Dock 上。
很抱歉,如果这是一个简单的过程,对于 mac 和 applescript 来说还是很新的。 感谢您的帮助
【问题讨论】:
标签: arrays macos applescript plist dock