Re: desktop picture
Re: desktop picture
- Subject: Re: desktop picture
- From: Martin Orpen <email@hidden>
- Date: Thu, 12 Jan 2006 19:25:36 +0000
On 11 Jan 2006, at 23:59, Nigel Garvey wrote:
Martin Orpen wrote on Wed, 11 Jan 2006 19:25:33 +0000:
set foo to (path to library folder as string) & "Desktop
Pictures:Abstract:"
tell application "Finder"
set bar to files of (foo as alias)
repeat with n in items of bar
set desktop picture to n
delay 3
end repeat
end tell
Is there a reliable way to _get_ the current desktop picture?
My lazy way uses the last line of this script:
tell application "Finder"
set foo to folder "Desktop Pictures" of folder "Caches" of folder
"Library" of startup disk
set bar to POSIX path of (first item of (get files of foo) as alias)
end tell
do shell script "strings " & quoted form of bar
-->"/Library/Desktop Pictures/ideaDesktop01.pdf"
No doubt all the lines preceding the last line could be improved upon?
But it seems to return the right result whether I change the image
using the System Prefs or via script. On my laptop I can get away
with a single line of shell script with a wildcard at the end, but
the workstations in the studio have too many users and there are a
whole bunch of caches in the folder.
Regards
--
Martin Orpen
_______________________________________________
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