【发布时间】:2026-02-20 00:35:02
【问题描述】:
我只需要能够通过终端运行脚本。只要您更改辅助功能中的某些设置,我就看到了其他脚本。这不是我想要做的选择。我试过下面的脚本,但收到以下错误:0:13:脚本错误:这个标识符后面不能有实数。 (-2740)
tell application "System Events"
set dockPlistFile to property list file "~/Library/Preferences/com.apple.dock.plist"
tell dockPlistFile
tell property list item "persistent-apps"
set appTileItems to value of (every property list item whose value of property list item "tile-data"'s property list item "file-label" is not "Terminal")
set its value to appTileItems
end tell
end tell
end tell
tell application "Dock" to quit
我正在尝试从 Dock 中删除终端图标。
提前致谢。
【问题讨论】:
-
您想从扩展坞中删除 APP 吗?或者你想要一个没有图标的后台应用?
-
从 Dock 中移除 APP。
-
澄清一下:您想隐藏脚本运行时弹出的图标吗?或者您想从 Dock 中删除一个 APP,比如右键单击并说“从 Dock 中删除”?
标签: macos applescript dock osascript