如何解决“无法继续计数”的问题处理参数的 AppleScript 应用程序中出现问题?
我正在尝试在网上找到的一个简单的 AppleScript:
on run argv
set rtn to ((count of argv) as text) & " parameters passed.
The parameters were:
"
repeat with arg in argv
set rtn to rtn & " " & (arg as text) & "
"
end repeat
return rtn
end run
我将其保存为应用程序。每次我从 Finder 中双击它时,都会弹出以下错误消息:
无法继续计数
我似乎找不到任何方法来解决这个问题。
运行 Mac OS X Snow Leopard 10.6.4。
I'm trying out a simple AppleScript I found online:
on run argv
set rtn to ((count of argv) as text) & " parameters passed.
The parameters were:
"
repeat with arg in argv
set rtn to rtn & " " & (arg as text) & "
"
end repeat
return rtn
end run
I saved it as an Application. Everytime I double click it from the Finder, I get the following error popup:
Can't continue count
I can't seem to find any way to solve this.
Running Mac OS X Snow Leopard 10.6.4.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您双击它时,您没有传递任何参数,因此没有什么可计算的......所以它会出错。您可以使用 try 块来解决错误。试试这个...
When you double-click it you aren't passing any arguments so there's nothing to count... so it errors. You can get around errors with a try block. Try this...