我试图从命令行或从Python程序创建Finder别名。我已经在网上搜索[1] [2] [3],发现的AppleScript此位:如何从命令行创建Macintosh Finder别名?
$ osascript -e 'tell application "Finder" to make new alias at POSIX file "/Users/vy32/cyber.txt" to POSIX file "/Users/vy32/a/deeper/directory/cyber.txt"'
不幸的是,它给了我这个错误:
29:133: execution error: Finder got an error: AppleEvent handler failed. (-10000)
[1] http://hayne.net/MacDev/Bash/make_alias
[2] https://discussions.apple.com/thread/1041148?start=0&tstart=0
[3] http://hintsforums.macworld.com/showthread.php?t=27642
我做错了什么?
出于兴趣,是 “启用辅助设备的访问” 打开了吗? http://hints.macworld.com/article.php?story=20060203225241914 – Coxy
我认为你把'at'和'to'转换为attribtutes。 – fireshadow52