• 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: desktop picture
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: desktop picture (From: "Nigel Garvey" <email@hidden>)

  • Prev by Date: Re: Various Qs about Intel and AppleScript
  • Next by Date: Remote Scripting?
  • Previous by thread: Re: desktop picture
  • Next by thread: Re: desktop picture
  • Index(es):
    • Date
    • Thread