Applescript:询问ApplescriptObjC的查找者?

Applescript:询问ApplescriptObjC的查找者?,applescript,applescript-objc,Applescript,Applescript Objc,这一行Applescript在我的Mac电脑上运行良好: tell application "Finder" to open POSIX file "/Development/Applescript/Rapport.docx" 但是,它因一个微不足道的ApplescriptObjC项目而失败: on applicationWillFinishLaunching:aNotification -- Insert code here to initialize your applicatio

这一行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)

我遗漏了什么?

我曾经有过一次问题,我无法解释这种奇怪的行为,但一点重新安排对我起了作用:

tell application "Finder" to open "/Development/Applescript/Rapport.docx" as POSIX file

一般来说,从OS X 10.9.2开始:在
“Finder
”的上下文中,始终使用
。。。作为POSIX文件而不是POSIX文件…
。为什么?只有苹果知道。这不是查找问题。AppleScriptObjC依靠一些邪恶的巫毒将自己插入AppleScript运行时,从而阻止AppleScript正确解释
别名“…”
POSIX文件“…”
说明符。AppleScript工程师提供的东西,AppleScript工程师会拿走。请注意,Finder将使用默认设置为打开该文件的任何应用程序打开该文件(在Finder中,请参阅文件>获取信息>打开方式)。如果要专门在Word中打开文件以进行进一步操作,请使用
告诉应用程序“Microsoft Word”打开[任何内容]
。(或者,如果您只想从ObjC打开文件,则根本不需要AS;请参阅或。)