Tôi đang cố gắng tạo Bí danh tìm kiếm từ dòng lệnh hoặc từ chương trình Python. Tôi đã tìm kiếm trên web [1] [2] [3] và tìm thấy chút này của AppleScript:Làm cách nào để tạo Bí danh Tìm kiếm Macintosh Từ Dòng Lệnh?
$ 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"'
Thật không may, nó mang lại cho tôi lỗi này:
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
Tôi đang làm gì sai?
Ra quan tâm, là "Cho phép truy cập cho các thiết bị trợ giúp" bật? http://hints.macworld.com/article.php?story=20060203225241914 – Coxy
Tôi nghĩ rằng bạn đã chuyển sang 'at' và' to' attribtutes. – fireshadow52