Re: How to set the background image of a folder ?
Re: How to set the background image of a folder ?
- Subject: Re: How to set the background image of a folder ?
- From: Johnny AppleScript <email@hidden>
- Date: Thu, 23 Sep 2004 12:39:14 -0600
On 04/09/22 5:08 AM, "Emile Schwarz" <email@hidden> wrote:
> To set a background image in a Folder, it is as simple as
>
> a. Command-J (View Presentation Info tool bar),
> b. Click in the Image RadioButton,
> c. Click in the Choose button (b and c: bottom of the windoid)
> d. Select an image to be used as the folder background image.
Others have tried to do this with GUI scripting, but it's highly unreliable.
I played around with adding such images to folders, and then checking
various plist files, both visible and invisible, and found no obvious
changes, except references to the recent folder and file path to the image
selected, but nothing specific to a window. I also looked around in the
caches folders, but nothing leapt out as being obviously modified.
Then, I remembered the info for a Finder window background image is stored
in the parent folder's .DS_Store file, but, to my knowledge, no one really
knows how to read or alter these things (memory serves up numerous blog
bitches about lack of docs on how to use this file).
You can add an image to a folder, then open its *parent folder's* .DS_Store
file in a text editor, and find the file reference, but there are enough
special characters that just replacing the string will not suffice.
Be aware, too, that however its stored, it is not user-specific, as any
images applied to shared folders are then seen by all users, even across the
network. This can be both useful and potentially offensive, obviously.
Now, all that said, here's how you make it work:
Create a static file path with an image called background.jpg (or
extension as appropriate); e.g.:
/path/to/folder/background/images/image1.jpg
Set a folder's preference to point to that image as background
Close the folder
*delete* the original image file
*copy* in a new one -- but keep the *same name and path*
Voila! The next time you open that folder, it will display the new image.
Note that you must *delete* the target image file, not move it, else the
.DS_Store file will track it by its reference to the new location; you must
copy in a new file with the same name, rather than move one in, else
.DS_Store will change its info again; and you must do this all with the
target folder closed (at least in my testing so far).
Personally, I would do this with shell scripts using rm and cp commands,
rather than Finder delete and copy commands, but its up to you. You can
install as many potential target images as you want, too; e.g.:
/path/to/folder/background/images/image1.jpg
/path/to/folder/background/images/image2.jpg
/path/to/folder/background/images/image3.jpg
/path/to/folder/background/images/image4.jpg
/path/to/folder/background/images/image5.jpg
Set this up with either an idling compiled background app, or assign the
script to cron or even GeekTool, and you can have freshly rotating
background images for any number of folders; combine it with a
daily/hourly/etc images download site get a surprise image every time you
open the folder.
This would actually be an interesting utility to work on, except that I
pretty much hate icon view and would never get to take advantage of it. For
me, I rotate desktop images on my multiple screens.
HTH
JA
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden