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

Re: name of the current desktop picture


  • Subject: Re: name of the current desktop picture
  • From: "koenig.yvan" <email@hidden>
  • Date: Sun, 11 May 2014 18:33:11 +0200


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




 _______________________________________________
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

  • Follow-Ups:
    • Re: name of the current desktop picture
      • From: Robert Poland <email@hidden>
References: 
 >name of the current desktop picture (From: Robert Poland <email@hidden>)
 >Re: name of the current desktop picture (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: name of the current desktop picture
  • Next by Date: Re: name of the current desktop picture
  • Previous by thread: Re: name of the current desktop picture
  • Next by thread: Re: name of the current desktop picture
  • Index(es):
    • Date
    • Thread