2013-02-17 137 views
2

我写了一个不支持脚本的Mac应用程序,我想用Applescript运行它。以下任一脚本都会收到“发生10660型错误。”。经过几个小时的搜索,我还没有找到解决方案或错误的解释。Applescript无法打开应用程序

if exists application "RotorDCU" then 
    display dialog "Found." buttons {"OK"} 
else 
    display dialog "Not found." buttons {"OK"} 
end if 

tell application "RotorDCU" 
    activate 
end tell 
+0

“xcode”标签是关于IDE本身的问题,而不是任何与Mac相关的编程问题。 – 2013-02-17 18:34:45

回答

4

错误-10660是发射服务的错误,在接口文件LSInfo.h解释说:

The app cannot be run when inside a Trash folder

在废纸篓RotorDCU,或许?

+0

我很好,印象深刻!我搜索的东西没有出现在LSInfo.h中。是的,RotorDCU在垃圾桶里。清空它可以执行“激活”脚本。 “If exists”现在说“RotorDCU出错了:无法继续存在。”好奇心,但不是什么大不了的事。 – Mike 2013-02-18 00:12:10

相关问题