Reputation: 265
I have created my AppleScript, tested it, saved it as an .app and it works.
Now, how do I set a custom icon for it?
I have done a bit of googling and tried a few different things but cannot get it to work. The app is mainly for me and maybe some people I know to make workflows easier so having a nice little icon makes a huge difference. Can anyone help with this please?
Upvotes: 11
Views: 16852
Reputation: 4581
This is how I do it:
The AppleScript icon should be replaced by the icon copied from the icon file.
A screen recording demonstrating this process can be viewed at this answer from AskDifferent.
Upvotes: 25
Reputation: 31
Here's another way on newer systems, I'm using macOS 12.1.
Open the new icon image file in Preview and choose File > Export...
Hold down the Option key while selecting "Format" and see a whole bunch of new choices including ICNS.
Save it, drop it in your Resources folder, and you're good to go.
Upvotes: 0
Reputation: 11
On newer systems if the above methods do not work there is another solution.
In Script Editor, after opening our script (.app), choose View
-> Show Bundle Contents
from the menu (or press cmd +0
).
In the panel that will expand on the right (Bundle Info) in the Resources
section, right-click the applet.icns
file and select delete
from the drop-down menu.
Our new icon file with the same name applet.icns
drag and drop into the window Resources
where you just deleted it.
Save application and voila :-D
Upvotes: 1
Reputation:
Just building into @pipwerks answers: You can also use Drag&Drop!
It works and now it's ready to add it to the dock or wherever you want.
Upvotes: 1
Reputation: 285064
.icns
icon file.Show Package Contents
Contents > Resources
applet.icns
Resources
folderResources
to applet.icns
Upvotes: 22