Help with applescript window image

Hey, so I was wondering if it's possible to make the window have an image like this but the image is a custom one from desktop .


User uploaded file

MacBook Air, iOS 10.3.3

Posted on Jun 27, 2018 9:10 PM

Reply
2 replies

Jun 28, 2018 8:40 AM in response to mpaol2023

One can reference a custom icon, where it is a System icon, or your own custom 512x512 .icns icon in AppleScript as the following:


property app_icon : "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/MultipleItems Icon.icns"


display dialog "some msg" with title "Test dialog panel" with icon POSIX fileapp_icon as alias

User uploaded file


Or as red_menace pointed out via AppleScript/ObjC, one can considerably extend the Alert dialog:

User uploaded file

I have complete control over the icon, informational, and message text fonts, and the green panel is a horizontally scrolling text view. In this case, it was a brief amount of AppleScript that calls a Python/Objective-C handler. Based on whether the return address contains valid Apple domain, or subdomains, the alert changes its icon, its text, and the scrolling text view changes its background color.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Help with applescript window image

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.