Re: ICON changes
Re: ICON changes
- Subject: Re: ICON changes
- From: KOENIG Yvan <email@hidden>
- Date: Mon, 4 Aug 2008 11:01:23 +0200
Le 4 août 2008 à 09:50, Michael a écrit :
Hi,
From my searches I believe this is likely not possible but I will
ask anyway.
I photograph bodybuilding shows.
So I end up with up to 150 folders with the images of individual
competitors in them.
While I am sorting the images and later is is very convenient to
have the icon of the folder be the icon from one of that
competitor's images.
I would like to make a droplet that I could drag and drop a JPG
file onto and have the droplet copy that file's icon and then paste
that icon onto the folder the file was in.
I have not been able to find any examples where Apple script can
access the icon of a file.
I have found quotes where people say this is not possible.
Does anyone have a way to do this?
Here is what I uses:
--[SCRIPT colle_icone_v3]
(* utilise osxutils
with a workaround for accented 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]
Yvan KOENIG (from FRANCE lundi 4 août 2008 11:01:18)
_______________________________________________
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