【发布时间】:2011-01-10 10:55:56
【问题描述】:
例如,为什么这个脚本适用于 AppleScript Editor 而不是 Automator?
display dialog "a lot of text just to break to line 4 whatever continuing... few more... argh... there!" with title "just a test" buttons {"Cancel", "Uninstall", "Continue"} default button 3 with icon caution
在 Automator 上注释掉 title 之后的所有内容,这就是我得到的区别:
我想要 title 和 3 行 如果可能的话,但这些并不是我出现的唯一奇怪的不一致行为editor 和 automator 之间关于 applescript 的过去一个小时。图标是另一个。
在实例中,我在 Automator 中尝试时遇到的错误是:
录音,这里的问题是:
- 为什么?为什么哦 Apple,为什么?
- 有什么方法可以至少使 title 起作用?
【问题讨论】:
-
在您显示的两个对话框中看起来都很难看。我不明白这个问题...
-
@Cody 这很丑,因为它只是一个测试。如果您尝试运行代码,也许您会明白...我不确定如何使其更清晰。
-
我试过了,但 Visual Studio 不会编译它。我现在不在 Mac 前。不过,我仍然认为你的问题没有意义。所以您发现 Automator 的行为有时与 AppleScript 不一致?这并不让我感到惊讶,因为 AppleScript 早在 18 年前就问世了,早在 Automator 之前。没错,AppleScript 不支持超过 3-4 行的消息框。想办法少说多说。
-
@Cody Gray:如果您了解 AppleScript 的内部工作原理,您可以理解并立即知道行为的原因 :)
标签: applescript automator