How to add an icon to your script....


display dialog "" & return & return buttons {"Cancel", "OK"} default button 2 with title "Title" with icon (path to resource "applet.icns" in bundle (path to me))

Save as an app bundle and the default script app icon should show in the dialog. If you want a custom icon for both app and dialog, substitute a suitable alternate .icns file for applet.icns in the Resources folder of the bundle package… using the same name.

The description.rtfd will show when a user opens the ‘About MyApp’ in the app name’s menu.

Note that any time you save a new version of your app using ‘Save As…’, you must replace the custom icon… and other modified resources (if any), in the new app.

Peter B.

(B. for Beelzebub)


Ben:

OK, I have tested the technique with both a stay open application and a droplet, it works just fine as discussed here. Drop the .icns file into your bundle, delete the original .icns file, rename the new .icns file (to whatever the old name was), re-save, and the icon magically changes to your custom icon.

I have also tried it with so called “Mac OSX icon” files, but no worky. They do need to be real .icns files.

Keep at it.

Thank God it works! :slight_smile:

For some reason, my “About” selection is grayed out and I populated the description.rftd file with some text. Why doesn’t it show?

Keep at it.

Peter B.

(AKA Idle Hands)


Could that be an odd permissions issue??

Does this mean you can only add 1 icon?

Says: File does not contain an icon.

I used a normal app icon. Is this not OK?

You have to use .icns files.

You can only have one icon for your app, but as many icons as you like for individual dialogs. See previous example(s).

Peter B.


It is .icns

aperson, Here’s a script that you can download. I hope it helps. :smiley:
http://www.mediafire.com/download.php?do3mtgu4pnd

Tom

Operating System: Mac OS X (10.4)