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

set picture of current desktop


  • Subject: set picture of current desktop
  • From: Yvan KOENIG <email@hidden>
  • Date: Mon, 11 Jun 2018 17:36:44 +0200

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

  • Follow-Ups:
    • Re: set picture of current desktop
      • From: Steve Mills <email@hidden>
    • Re: set picture of current desktop
      • From: Deivy Petrescu <email@hidden>
    • Re: set picture of current desktop
      • From: Robert Poland <email@hidden>
  • Prev by Date: AppleScriptObjC – A More Comprehensive Touch Command
  • Next by Date: Re: set picture of current desktop
  • Previous by thread: AppleScriptObjC – A More Comprehensive Touch Command
  • Next by thread: Re: set picture of current desktop
  • Index(es):
    • Date
    • Thread