Re: Picture not aways replaced
Re: Picture not aways replaced
- Subject: Re: Picture not aways replaced
- From: Shane Stanley <email@hidden>
- Date: Mon, 06 Jan 2014 17:45:47 +1100
On 6 Jan 2014, at 4:25 AM, Neil Laubenthal <email@hidden> wrote:
does anybody have one that will tell you the name of the current desktop picture on either the current (or all) spaces?
You could try this; it needs to called from an ASObjC-based script library:
use framework "Foundation" on spacePicPaths() set defs to current application's NSUserDefaults's standardUserDefaults() set theDict to defs's persistentDomainForName:"com.apple.desktop" set theSpaces to theDict's valueForKeyPath:"Background.spaces." set allVals to theSpaces's allValues() set thePaths to allVals's valueForKey:"ImageFilePath" return thePaths as list end spacePicPaths
Called via:
use theLib : script "<name of the lib>" set thePaths to theLib's spacePicPaths()
|
_______________________________________________
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