AppleScript dialog icons FAQ: How do I put icons on my AppleScript dialogs?
I started to get into this a little bit in my earlier “How to customize AppleScript dialogs” tutorial, but in this article I thought I’d just dig into the AppleScript dialog icons details.
AppleScript dialog icons: The “with icon” syntax
In short, you add icons to your AppleScript dialog using the AppleScript “with icon” syntax. Here are a few simple examples.
First, the AppleScript dialog note icon:
display dialog "Hello" with icon note
As you can see, that syntax added the note icon to the left of the AppleScript dialog.
AppleScript dialog stop icon
Next, the AppleScript dialog stop icon:
display dialog "Hello" with icon stop
Again, you use the AppleScript “with icon” syntax, just adding the word “stop” after “with icon.”
AppleScript dialog caution icon
Finally, the AppleScript dialog caution icon:
display dialog "Hello" with icon caution
AppleScript dialog icons - Summary
I hope these AppleScript dialog icon tips have been helpful.