Re: name of the current desktop picture
Re: name of the current desktop picture
- Subject: Re: name of the current desktop picture
- From: Robert Poland <email@hidden>
- Date: Sun, 11 May 2014 10:42:52 -0600
On May 11, 2014, at 10:33:AM, koenig.yvan <email@hidden> wrote:
>
> Le 11/05/2014 à 18:15, Luther Fuller <email@hidden> a écrit :
>
>> On May 11, 2014, at 9:23 AM, Robert Poland wrote:
>>
>>> I want th find the name of the current desktop picture.
>>
>> Do these two lines of code give you anything useful ...
>>
>> tell application "System Events" to (picture of current desktop) as alias
>> tell application "Finder" to name of the result
>>
>> The only problem I see is that the name is returned with the file extension.
>
> Good point Luther.
> The extension is not a problem as Robert asked for it in its late message (the extension is not available in the GUI).
> Here is an edited version written because I don't see the need to speak to the Finder.
> I defined two variables so the full pathname will be already available when Robert will ask for it ;-)
>
> tell application "System Events"
> set backGroundPath to (picture of current desktop) # returns an Unix path
> set backGroundName to name of disk item result
> end tell
>
> Yvan KOENIG (VALLAURIS, France) dimanche 11 mai 2014 18:32:15
Works and avoids the Sandbox issues.
Robert Poland
Fort Collins CO
_______________________________________________
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