Re: Get name of desktop image. Is this a bug?
Re: Get name of desktop image. Is this a bug?
- Subject: Re: Get name of desktop image. Is this a bug?
- From: Joe <email@hidden>
- Date: Mon, 16 Jun 2008 17:33:10 -0700
Nigel Garvey wrote:That must be a new one in Leopard. In Tiger, you can get the name of the current picture like this:
set pFile to (path to preferences as Unicode text) & "com.apple.desktop.plist"
tell application "System Events" get value of property list item "LastName" of property list item 1 of property list item "Background" of property list file pFile end tell
Yes. I'm on Leopard but your script works fine here as well - Even with the desktop image set to change randomly.
If I cause the desktop image to change using AppleScript (another Leopard feature) the script you posted will get the name of the image that was last set automatically by the operating system, not the current image. (if you set it you can't get it)
Waiting until the system automatically advances the desktop image restores the ability of the script to return a correct answer.
Joe |
_______________________________________________
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