【发布时间】:2015-10-20 14:24:09
【问题描述】:
显然有一个applescript 允许更改查找器窗口的背景颜色。我可以调用任何objective-c API来更改颜色和/或设置与路径相关的Finder文件夹以显示特定背景图像吗?我想创建一个git hook,它在特定分支上将目录的 finder 文件夹更改为红色(为了直观地显示我不应该对该分支进行更改)。
【问题讨论】:
标签: objective-c macos finder
显然有一个applescript 允许更改查找器窗口的背景颜色。我可以调用任何objective-c API来更改颜色和/或设置与路径相关的Finder文件夹以显示特定背景图像吗?我想创建一个git hook,它在特定分支上将目录的 finder 文件夹更改为红色(为了直观地显示我不应该对该分支进行更改)。
【问题讨论】:
标签: objective-c macos finder
在这里,我找到了如何更改所选文件夹中的所有查找器窗口,在这里使用它:
tell application "Finder"
set ChosenFolder to (choose folder)
set TheseFolders to (every folder of entire contents of ChosenFolder)
repeat with CounterA from 1 to (count of TheseFolders)
set background color of icon view options of window of item CounterA of TheseFolders to (choose color)
end repeat
end tell
希望这有帮助!
【讨论】:
很抱歉,我只知道如何在 Applescript 中进行操作:
有图片
tell application "Finder" to set the desktop picture to (choose file of type "png")
这是使用纯色的方法
tell application "Finder" to set the desktop picture to "Library:Desktop Pictures:Solid Colors:(Color Name)"
颜色名称列表:
【讨论】: