• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Need an icon
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need an icon


  • Subject: Re: Need an icon
  • From: Yvan KOENIG <email@hidden>
  • Date: Wed, 26 May 2010 21:42:18 +0200


Le 26 mai 2010 à 21:05, Luther Fuller a écrit :

On May 26, 2010, at 1:24 PM, Martin Michel wrote:

Some time ago I wrote a small tool to set an image as the icon for a certain file/folder, of course it also works with icns files. The name of the tool is a bit weird, but maybe you can use it:

http://macscripter.net/viewtopic.php?id=31683

I took a quick look at that page. It does not seem to work with folders.

In my experience, the only way to assign an icon to a folder is to first, copy the icon from a Get Info window, then paste the icon into the Get Info for the folder.

There may be other ways to do this, I just haven't seen one, yet.


For years, I use this short script :

--[SCRIPT colle_icone_v3]
(* utilise seticon 
with a workaround for non-ASCII chars*)

on run
open ((choose file) as list)
end run

on open (sel)
local tName, f, coF, nocoF, coFut, Fut
tell application "Finder"
set f to (sel's item 1) as alias
set coF to (container of f) as alias


set {nocoF, tName} to {name of coF, "osxutils_slituxso"}
set name of coF to tName (* renomme provisoirement *)
end tell -- to Finder 


do shell script "/usr/local/bin/seticon " & quoted form of POSIX path of f & " " & quoted form of POSIX path of coF


tell application "Finder"
set name of (coF as alias) to nocoF (* remet le vrai nom *)
update coF
end tell
end open
--[/SCRIPT]

-- "Macintosh HD:usr:local:bin:GetAliasTarget"
-- "Macintosh HD:usr:local:bin:seticon"

Which calls a shell command named from osxutil named seticon.

Look at http://hasseg.org/blog/post/11/a-shell-script-to-assign-icons-to-files-or-folders-in-os-x/

In this Web page you may find

an other example using seticon
and a python piece of code which seems to be OK under 10.6 (seticon isn't).

Yvan KOENIG (VALLAURIS, France) mercredi 26 mai 2010 21:41:54



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Need an icon
      • From: Luther Fuller <email@hidden>
References: 
 >Need an icon (From: email@hidden)
 >Re: Need an icon (From: Martin Michel <email@hidden>)
 >Re: Need an icon (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: Another Applescript noob
  • Next by Date: Re: Need an icon
  • Previous by thread: Re: Need an icon
  • Next by thread: Re: Need an icon
  • Index(es):
    • Date
    • Thread