AppleScript : Add a custom icon to “display dialog”

There are many ways to add icons to dialog in AppleScript, but I never found a way to easily add a “custom” icon. You can use the command “with icon file” in your script :

display dialog "My custom icon " buttons {"Cancel", "Continue"} default button "Continue" with icon file "Path:to:my.icon.icns"

4 Replies to “AppleScript : Add a custom icon to “display dialog””

  1. This doesn’t work from osascript in the command shell. You can only use this syntax in the AppleScript editor. Haven’t found the osascript syntax yet.

Leave a Reply

Your email address will not be published. Required fields are marked *