Re: Saving images as folder icons
Re: Saving images as folder icons
- Subject: Re: Saving images as folder icons
- From: Kenneth McDonald <email@hidden>
- Date: Fri, 4 Jun 2004 00:39:04 -0500
I'd experimented with one idea (not even an AppleScript thing)
before, and didn't get it to work, but perhaps with a bit of tweaking...
If one uses something like Python to list the contents of a
directory with a folder icon, one sees a file:
"Icon\r",
where the "\r" is how Python indicates a special character (in this
case,
a linefeed I think).
Now obviously, there some magic going on here to begin with since
the file doesn't show up on the terminal even under 'ls -a'.
In any case I:
1) Opened an image file and pasted itself in as its own thumbnail
2) Used Python to zero its data fork (wrote an empty string to it)
and to move it to a file named "Icon\r"
On the off chance that this might result in the enclosing folder being
iconized. Sadly, it was not so. In addition, the file was visible in
both the
finder and the terminal.
I can think of two possibilities:
1) A folder icon "Icon\r" has a different-format resource fork than
what I created, in which case I doubt anything (easy) will let this
work, or
2) The file needs to be tagged with some other metadata--which might
or might not be possible in AppleScript, but this is the limit of
my knowledge/guessing.
Any thoughts?
This is an annoying little restriction...
Cheers,
Ken
On Jun 4, 2004, at 12:00 AM, email@hidden
wrote:
This is one thing that has stumped most of us. I believe the current
consensus is that there is no way to do this with plain-vanilla
AppleScript. Maybe you can find a scripting addition or application
that will help you to do it but this is a common question and I have
yet to see a good answer for it.
Hmm, any Apple people around take note! It'd be nice to add
AppleScript support for icons to the Finder, System Events, or to
Standard Additions.
- Ken
On Jun 3, 2004, at 10:09 PM, Kenneth McDonald wrote:
I'm rather new to AppleScript, so forgive me if I display my ignorance
:-)
I'm writing a little program to do some photo album organization, and
would like to (amongst other things) be able to automatically create
a folder icon for a folder holding photos by scaling the first image
found in the folder (and preferably adding a border, but that's just
a frill). One of the example scripts included with 10.3 shows how to
use Applescript to automatically write a thumbnail to an image file
(using Image Events functionality), but I can't for the life of me
find out how to do such a thing for a folder. Any suggestions?
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.