“使用applescript无法获得别名”

时间:2016-05-26 15:20:03

标签: scripting applescript finder

我正在创建一个脚本,其中变量设置为文件夹路径。我告诉finder创建该文件夹的别名,但我收到了一个错误。

tell application "Finder"
    make alias of art to desktop
end tell

错误:Can’t get alias of "PATH:TO:FILE"

1 个答案:

答案 0 :(得分:1)

试试这个:

set originalFIle to (choose file)
tell application "Finder" to make new alias file to originalFIle at desktop