Applescript desktop notification icon

Hi there,


I've created a basic Applescript that triggers a desktop notification. I'm trying to customise the icon so that when the notification appears it doesn't use the default Applescript icon and instead uses one that I've set up. I've tried adding the icon to the resources folder of the script (with the applet.icns name) and it's not updating. Has anyone else had issues with icons?


Thanks,

Paul


User uploaded file

MacBook Pro, Mac OS X (10.6.7)

Posted on Apr 18, 2016 12:17 PM

Reply
4 replies

Apr 18, 2016 1:55 PM in response to Paul Minors

As long as you replace the Cocoa-AppleScript application bundle's resource applet.icns with your own custom applet.icns before you save the application, then your custom.icns will appear immediately as the saved application's icon, and also will appear as the icon on the notification panel. There is no means to specify a custom icon with the display notification clause via AppleScript.


User uploaded fileUser uploaded file

Apr 18, 2016 2:07 PM in response to Paul Minors

The AppleScript-Cocoa Applet template must be saved as an application. If you save it as a Script Bundle, all it will do when you double-click it is launch the Script Editor, and no notification will occur. You would save it as a script bundle into your local Library/Script Libraries if all it contained were your own custom handlers, or AppleScript/Objective-C handlers that would be referenced in other AppleScript-based applications.

Apr 18, 2016 2:35 PM in response to VikingOSX

I'm using the notification to show that an Automator workflow has worked in side Mail. I'm using a shellscript to call in the applescript in Automator. The reason I don't want to use an application is that when you launch the app, the desktop changes spaces when the app is opened. I'd like to be able to run the script, which fires the notification (with the icon) inside Mail, without the desktop changing space... Is this possible? Or would I need to use an app instead of a script?

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.

Applescript desktop notification icon

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