由于&QUOT行错误的结束;使用脚本" [英] End of line error due to "use script"

查看:167
本文介绍了由于&QUOT行错误的结束;使用脚本"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有苹果脚本,工作完全正常,直到我加入使用脚本警报实用程序的开始。然后,它给人的预期线等最后却发现标识符的在错误设置MD5做shell脚本MD5 -q&放大器。 MYFILE 援引形式高亮显示。什么能可能会造成这个错误?

I have apple script which is working perfectly fine, until I add use script "Alert Utilities" at the start. Then it gives Expected end of line, etc. but found identifier. error at set md5 to do shell script "md5 -q " & quoted form of myFile with shell highlighted. What could possible be causing this error?

推荐答案

添加使用脚本添加和code将会运行得很好。由于AppleScript的2.3(小牛)有新的使用语句。它会告诉那些需要运行脚本neccessary资源,如哪些应用程序(可选),脚本库,在AppleScriptObjC或是否会使用脚本添加或不Cocoa框架。因为当不使用使用语句的向后兼容性,默认情况下脚本除了被加载。如果使用语句时,脚本添加默认情况下未加载。

Add use scripting additionsand the code will run fine. Since AppleScript 2.3 (Mavericks) there is the new use statement. It will tell the neccessary resources that are required to run the script like which applications (optional), script libraries, cocoa frameworks in AppleScriptObjC or if it will use scripting additions or not. For backward compatibility when the use statement is not used, by default scripting addition are loaded. If the use statement is used, the scripting additions are by default not loaded.

所以,你的脚本将如下:

So your script will look like:

use script "Alert Utilities"
use scripting additions
-- continue code
set md5 to do shell script "md5 -q " & quoted form of myFile

这篇关于由于&QUOT行错误的结束;使用脚本"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆