Re: change desktop wallpaper
Re: change desktop wallpaper
- Subject: Re: change desktop wallpaper
- From: Ed Stockly <email@hidden>
- Date: Mon, 26 May 2008 09:44:36 -0700
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"
because it requires the file to be there when you compile the script,
which, in this case, may mean fewer runtime surprises.
HTH
Ed
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
_______________________________________________
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