71

I have created a couple of automator scripts. I was curious if there is a way to change the application icon on those scripts to something other than the robot.

1
  • 4
    Platypus (brew cask install platypus) is simpler than Automator, offers more options, including setting a proper icon, and is open source. You can create a launcher with it without writing any applescript code. E.g. it took a couple of minutes to make an mpv launcher that accepts files via drag-n-drop.
    – ccpizza
    Apr 1, 2017 at 14:20

6 Answers 6

112

After the script has been created do the following :

  1. Find the source app with the icon you want

  2. Get Info of the source app (cmd-i)

  3. Click on the icon inside the source app's info window (Not the one in the big Preview section at the bottom, if you have one of those; the little one in the top-left corner.)

  4. Copy it (cmd-c)

  5. Get Info of the automator script (i.e., the destination app) (cmd-i)

  6. Click on the icon inside the destination app's info window

  7. Paste the icon from the clipboard (cmd-v)

This method works for every files in Mac OS X.

picture to illustrate instructions

8
  • +1 for your brief and complete explanation, but if you add some image it's become better.
    – Am1rr3zA
    Aug 22, 2010 at 21:23
  • I like this solution better. Much less hassle. Aug 22, 2010 at 22:04
  • That doesn't do anything. There's no action when i type the cmd-c or cmd-v.
    – BetaRide
    Jun 13, 2014 at 6:40
  • This does not behave as it should in Mavericks
    – qed
    Aug 7, 2014 at 9:53
  • 7
    @qed I also thought it wasn't working in Mavericks, but then realized to copy and paste the little icon at the very top of the Get Info window, not the one in the Preview section... Studer might want to update step 3 to indicate which icon to focus on. Sep 2, 2014 at 20:19
12

I found a hacky way to do it after you have created the applet

  • (Create your icns icon file - however you want)
  • Open Applications Folder
  • Right-click on automator script
  • Click on view package contents
  • Add your icon to resources folder
  • Rename it to AutomatorApplet.icns

I am sure there is a better way, but I figured out how to do it this way.

5
  • 1
    This is the way I think it should work, but for some reason, it is not working for me. I am OS X 10.9.2, and after replace the icns file, I have already try to log off and log in again, still not helps.
    – chenyi1976
    Apr 20, 2014 at 5:39
  • 2
    I just got percent20's method to work by adding one more operation: 1. Follow the "hacky way to do it" process above 2. Close the app bundle and once again do a Cmd+I Get Info on the app icon 3. Delete the current (now legacy) icon in the Get Info sheet 4. The icon in the .icns file you inserted in 1. above will appear. S Dec 5, 2014 at 21:52
  • I tested this answer on OS X Mavericks (10.9.5) and it worked... after a reboot! Seems there is some icon caching going on that a reboot must clear up. I didn't need to follow @SimonPride's additional steps above.
    – TrinitronX
    Jan 6, 2015 at 23:44
  • An addition to @SimonPride's solution, I had to drag my icns file to icon n Get Info panel for it to work. I've copied the icon to resources folder as a fallback.
    – Inan
    Dec 21, 2018 at 11:01
  • @SimonPride Thanks--As soon as I did "Get Info" on the Application after changing the .icns file inside, it switched over to my new .icns file. Weird cache stuff hanging on I guess
    – velkoon
    Mar 2 at 3:26
9

You can also change the icon just as you would normally for any other folder or file in Mac OS X:

  1. Copy the image you want to use as your icon. Ideally it should be 512x512 already.
  2. Choose Get Info on the file/folder/app in Finder
  3. Click on the Icon and you'll notice a blue outline on the icon - now press Command-V or choose Paste from the Edit menu.

Example

(Screenshot taken from Super User question 37811)

1
9

To complement the existing, helpful answers:

  • The accepted answer works in principle, but:

    • relies on extended attributes of the HFS+ filesystem, which are lost when copying the bundle to a filesystem that doesn't support them. For instance, you cannot store a custom icon in a Git repository.
    • the icon displayed by the bundle itself, such as when showing an alert, is still the original icon.
  • percent 20's answer is more comprehensive and portable in principle, but comes with two caveats:

    • Any changes to AutomatorApplet.icns are lost whenever you modify and re-save the bundle in Automator.
      Thus, for instance, you'd need a script to put the updated icons in place programmatically every time the bundle is saved.
    • As others have noted, there are icon caching issues, which can be tricky to resolve; as of OSX 10.10.4:
      • Even a reboot doesn't make the new icons appear in Finder (though it does appear in other contexts such as in the Dock), but there are two workarounds: either (a) move the bundle to a different folder, or (b) rename the bundle; given that reverting to the original path and name makes the problem reappear, you'd have to plan ahead: create your bundle in a different location or with a different name, then move / rename to the desired location / name.
      • Alternatively, you can use a tool such as OnyX and check IconServicesunder Cleaning > User to clear the cache.
-1

This seems a silly answer but it taught me a interest addittional info

Restore the original icon for an item

  1. On your Mac, select the file or folder, then choose File > Get Info.

  2. At the top of the Info window, select the custom icon, then choose Edit > Cut.

Only drawback about this simple apple hidden feature: You can't undo the 'Restore original' icon by executting cmd + z from just made from inside Get Info... Or so it seemed.
Lucky me, I noticed that my custom icon wasn't completly removed in all the places (still present in the top side of the Get Info and in the Finder window miniature I both left opened).

So I found out a simple cmd + z from Finder window reverted my disaster.

Maybe it should be safer to store the copy-pasted custom icon in Contents/Resources/description.rtfd inside Package Contents

-2

Apple's official page on customizing files and folders works great for this!

For the sake of completeness, for others who view this, I am sharing this.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .