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:11:33 -0600
Thanks Yvan,
Question; Is there a simple way to not trim the extension (JPG for example) from the result?
On May 11, 2014, at 9:34:AM, koenig.yvan <email@hidden> wrote:
>
> Le 11/05/2014 à 16:23, Robert Poland <email@hidden> a écrit :
>
>> Hi,
>>
>> I know I asked this before but I can’t seem to find the replies.
>>
>> I want th find the name of the current desktop picture.
>>
>> Something like this;
>>
>> tell application "Finder"
>> tell "System Preferences"
>> tell "Desktop & Screen Saver"
>> set x to name of "background picture"
>> end tell
>> end tell
>> end tell
>> x
>>
>> TIA,
>
>
> Hello Bob
>
> Try this one :
>
> tell application "System Events"
> tell application "System Preferences"
> activate
> (*
> # Code used to grab the anchor's names
> tell pane id "com.apple.preference.desktopscreeneffect"
> name of its anchors
> --> {"DesktopPref", "ScreenSaverPref"}
> end tell
> *)
> reveal anchor "desktopPref" of pane id "com.apple.preference.desktopscreeneffect"
> delay 0.5
> end tell -- application "System Preferences"
>
> tell process "System Preferences"
> tell window 1 -- "Desktop"
> set currentBackgound to value of first static text of first tab group
> end tell
> end tell -- process "System Preferences"
> tell application "System Preferences" to quit
> end tell -- application "System Events"
>
> currentBackgound
>
> Yvan KOENIG (VALLAURIS, France) dimanche 11 mai 2014 17:33:32
>
>
>
> _______________________________________________
> 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
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