Name

display alert

Synopsis

informational dialog

informational dialog

Syntactically, a simpler version of display dialog; there is no user text entry. Has a more Cocoa-like appearance than display, dialog; there can be title text and smaller message text, and the icon has the proper look for the host application. The default is a single button ("OK"), and there is always a default button (the rightmost, by default). A button named "Cancel" is not automatically the Cancel button. The third (leftmost) button is gapped away from the others. Returns a record. (New in Tiger.)

Example

tell application "Finder"
    display alert "Pep Alert" message "Mannie, Moe, and Jack welcome you."
end tell

Get AppleScript: The Definitive Guide, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.