我試圖從命令行或從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