"display alert" problems with Automator
I want to use the display alert command in my Automator application but the following won't compile:
display alert "foobar" buttons {"Cancel", "OK"}
and this error message pops up:
Syntax Error
Expected end of line, etc. but found plural class name.
and it selects the word "buttons".
The same line of code works in AppleScript Editor. It just doesn't make sense to me.
If I take away the "buttons" part it also works in Automator but why should I be unable to add buttons? (By the way, "cancel button "whatever"" won't compile in Automator either and raises the same error).
Finally, the only reason I am resorting to "display alert" at all instead of using "display dialog" (which doesn't have said issue in Automator) is that "display dialog" doesn't increase the popup's height to accomodate multiple lines of text. Both of these commands are just a pain in the neck.
Thanks in advance for any clues of solving this.
MacBook Pro, Mac OS X (10.6.8), Late 2011, 17-inch