2011-01-10 12 views
0

例如,爲什麼此腳本可以在AppleScript編輯器但不是Automator?剛上的Automator的標題爲什麼AppleScript顯示對話框在編輯器和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

談到了一切,這就是區別,我得到:

alt text

冠軍超過3如果可能的話,行,但這些不是我在pa中看到的唯一奇怪的不一致行爲關於蘋果之間的約一小時編輯automator。該圖標是另一個。

在實例中,我得到了在Automator中嘗試它的錯誤是這樣的:

Syntax Error

錄音,這裏的問題是:

  1. 爲什麼?爲什麼哦蘋果,爲什麼?
  2. 任何方式來至少使標題工作?
+0

它看起來醜陋在你展示的兩個對話框中,我不明白這個問題...... – 2011-01-10 11:12:31

+0

@Cody它的醜陋,因爲它只是一個測試*。瞭解你是否試圖運行代碼...我不知道如何使它更清楚 – cregox 2011-01-10 11:50:06

回答

9

該問題的原因是Automator的進口terminologies of Applescript Studio,其中重新定義重定義display dialog作爲Panel Suite的一部分;該版本沒有with title參數。您可以使用Applescript編輯器打開Automator進行檢查。 (使用文件→打開字典...)我同意這是蘋果:(

一個愚蠢的決定,您可以通過使用

using terms from application "Finder" 
    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 
end using terms from 

從裏面的Automator解決這個問題;這告訴AppleScript的的編譯器,使display dialog命令調用標準清晰度

相關問題