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

Re: set picture of current desktop


  • Subject: Re: set picture of current desktop
  • From: Deivy Petrescu <email@hidden>
  • Date: Mon, 11 Jun 2018 11:55:19 -0400

Yvan, there is nothing wrong with your script, i broke it down piece by piece
and everything is fine.
It works in my computer.
However, you don’t need to change the files t posix file paths.
System events works with both, differently than the finder.
But the script is OK.
What kind of errors you get?

> On Jun 11, 2018, at 11:36 , Yvan KOENIG <email@hidden> wrote:
>
> Hello
>
> Is one of you able to tell me what is wrong with this code which is supposed
> to set the picture of the current desktop ?
> It defines the desktop's properties but fails to display the picture.
>
> set theFile to choose file of type {"jpeg", "jpg"}
>
> tell application "System Events"
>       set pictFolder to path of container of theFile
> end tell
>
> set PosixFolder to POSIX path of pictFolder
> set PosixFile to POSIX path of theFile
>
> tell application "System Events"
>       tell current desktop
>               set pictures folder to PosixFolder
>               set picture to PosixFile
>               get properties
>               --> {display name:"iMac", change interval:1800.0, id:69731072,
> random order:false, picture rotation:0, pictures
> folder:"/Users/**********/Desktop/",
> picture:"/Users/**********/Desktop/20170614_154507_p-2017-amenagement-interieur-jean-marc-renou2.jpg",
>  translucent menu bar:missing value, class:desktop}
>       end tell
> end tell
>
> Yvan KOENIG running High Sierra 10.13.5 in French (VALLAURIS, France) lundi
> 11 juin 2018 17:36:21
>
>
>
> _______________________________________________
> 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

Deivy Petrescu
email@hidden



 _______________________________________________
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

References: 
 >set picture of current desktop (From: Yvan KOENIG <email@hidden>)

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