How to change the icon for an AppleScript on macOS
Icons don’t get the credit they deserve until you’re stuck looking at a particularly ugly one that tells you nothing about the item it belongs to. When made well, an icon is the simplest way to identify an item without even having to read its name. It stands to reason that most apps pay a great deal of attention to their icons but scripts get the short end of the stick. They’re all stuck with the default icon for the app that created them, or the icon that’s reserved for that particular type of file. That said, if you need to differentiate a whole bunch of scripts on your Mac, you can change the icon for an AppleScript fairly easily. Here’s how.
Create ICNS file
Icons on macOS are in the ICNS file format. The simplest way to create an icon is to find a suitable PNG image, and convert it to this format. There are lots of apps that can convert an ordinary image to ICNS format but we recommend using Image2icon. It’s free.
Drag & drop the image you want to use onto the app, and select the ICNS format to convert it. Name the converted file “applet.icns”.
Save script as Application
Now that you have your icon, you need to convert the script into an application. You can do this with Script Editor. Open the script in the app and go to File. Hold down the Option key and you will see a Save As option in the File menu. Select it, and then save the script as an application.
Changing icons
Once you have the script in application form, it’s time to change the icon. We will do this in two steps. The first step will change the icon that the notification generated by the application will show. To change it, right-click the application and select Show Package Contents from the context menu.
In the folder that opens, go to Contents>Resources. Here, you will find a file named “applet.icns”. Copy the icon file you created earlier to this same folder. You will be asked if you want to replace the file of the same name. Go ahead and replace it.
Next, right-click the application and select ‘Get Info’. You will see a window that shows you information about the app. The first section shows the icon that’s used by this application. Drag & drop the icon you created earlier on to the icon in this window. The application will now use this icon in Finder.
That’s all there is to it.