这个单行 Applescript 在我的 Mac 上运行良好:
tell application "Finder" to open POSIX file "/Development/Applescript/Rapport.docx"
然而,它在一个简单的 ApplescriptObjC 项目中失败了:
on applicationWillFinishLaunching:aNotification
-- Insert code here to initialize your application before any files are opened
tell application "Finder" to open POSIX file "/Development/Applescript/Rapport.docx"
end applicationWillFinishLaunching:
我得到的错误是:
*** -[CMDAppDelegate applicationWillFinishLaunching:]: POSIX file "/Development/Applescript/Rapport.docx" of «script» doesn’t understand the “open” message. (error -1708)
我错过了什么?