• 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: change desktop wallpaper
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: change desktop wallpaper


  • Subject: Re: change desktop wallpaper
  • From: Joe <email@hidden>
  • Date: Mon, 26 May 2008 11:57:25 -0700

At 6:04 PM +0200 5/26/08, Julian Flach wrote:

>Hi everbody,
>
>I try to make a little script, which changes my desktop wallpaper, but I've a problem...
>
>I have the following piece of code:
>
>tell application "Finder"
>	set desktop picture to {"Macintosh HD:Users:test.jpg"} as alias
>end tell
>
>But wenn I execute the code, I get the message: ' Couldn't find the file "Macintosh HD:Users:test.jpg" '. But the file exists at these place, because if I write
>
>tell application "Finder"
>	open file "Macintosh HD:Users:test.jpg"
end tell

At 9:19 AM -0700 5/26/08, Michelle Steiner wrote:

>>
>
>Your script works for me.  I'm using Leopard 10.5.2
>


At 9:44 AM -0700 5/26/08, Ed Stockly wrote:
>Try this:
>
>tell application "Finder"
>    set desktop picture to "Macintosh HD:Users:test.jpg"  as alias
>end tell
>
>With the {} you're trying to coerce a list into an alias, which doesn't always work.
>
>You may also try any of these:
>
>    set desktop picture to alias "Macintosh HD:Users:test.jpg"
>    set desktop picture to file "Macintosh HD:Users:test.jpg"
>    set myDesktopPhoto to  "Macintosh HD:Users:test.jpg"  as alias
>    set desktop picture to myDesktopPhoto
>    set desktop picture to item 1 of{"Macintosh HD:Users:test.jpg" } as alias
>
>This one is my favorite:
>
>    set desktop picture to alias "Macintosh HD:Users:test.jpg"

Not a single example given works on my G5, so I looked in the new AppleScript pages and found this.

tell application "System Events"
 -- SET DESKTOP TO SPECIFIC PICTURE
 tell current desktop
  set picture rotation to 0 -- (0=off, 1=interval, 2=login, 3=sleep)
  set picture to file "Mac HD:pteranodon-lw.jpg"
 end tell
end tell

Which works fine.

Joe
 _______________________________________________
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: change desktop wallpaper
      • From: Michelle Steiner <email@hidden>
References: 
 >change desktop wallpaper (From: Julian Flach <email@hidden>)
 >Re: change desktop wallpaper (From: Ed Stockly <email@hidden>)
 >Re: change desktop wallpaper (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: change desktop wallpaper
  • Next by Date: Re: change desktop wallpaper
  • Previous by thread: Re: change desktop wallpaper
  • Next by thread: Re: change desktop wallpaper
  • Index(es):
    • Date
    • Thread