【发布时间】:2019-07-20 18:41:03
【问题描述】:
我有一个applescript,它在桌面上创建一个指向文件系统上可执行文件的快捷方式。可执行文件具有标准的 exec 图标。是否可以将图标更改为指向 icns 文件?
我读过你可以使用第三方程序来做到这一点,如 Change icon of folder with AppleScript?
但是否可以不使用外部程序来执行此操作?
这是我的脚本
set source_file to (POSIX file "path to my exectuable")
tell application "Finder"
make new alias file at desktop to source_file
set name result to "My Shortcut"
end tell
注意:我也可以使用 ln -s 命令创建相同的快捷方式,但我没有得到任何图标,它只是一个空白页符号快捷方式
【问题讨论】:
标签: icons applescript alias icns