cqlsh 当前将命令记录到 ~/.cassandra/cqlsh_history 将其更改为 /var/log/cqlsh 会非常方便
我猜有一个可选的 cqlsh 日志配置文件。我在任何地方都找不到它的记录。有人知道这是什么一回事吗?
我正在尝试从坞站中删除(所有)项目。我可以按名称删除它们,如下所示:
tell application "System Events"
tell UI element "Launchpad" of list 1 of process "Dock"
perform action "AXShowMenu"
click menu item "Remove from Dock" of menu 1
end tell
end tell
Run Code Online (Sandbox Code Playgroud)
但我想拉出当前项目的列表并迭代它们。 这个堆栈溢出问题似乎涵盖了如何获取列表。我想做的是调整上面的代码以在循环内运行。我猜想在循环内引用列表的当前项目将使用“thisRecord”完成。我想我误解了如何将“thisRecord”转换为我可以在系统事件中引用的内容。
set plistpath to (path to preferences folder as text) & "com.apple.dock.plist"
tell application "System Events"
set plistContents to contents of property list file plistpath
set pListItems to value of plistContents
end tell
set persistentAppsList to |persistent-apps| of pListItems
set dockAppsList to {}
repeat with thisRecord in …Run Code Online (Sandbox Code Playgroud)