|
|
Set desktop pictures using AppleScript
I feel extremely dumb, but when I try to run just the desktop-picture changing part of this code (in the hopes of creating an applescript file I can call from elsewhere), like so: tell application "Finder" set desktop picture to file "~/the/exact/location/of/my/file.jpg" end tell I get 'Error: Finder can't set desktop picture to blah blah blah'.don't use unix file pointers. they work sometimes in the Finder, but not reliably. use Mac (colon-delimited) pointers. try HD:Users:yourname:location:of:file.
Set desktop pictures using AppleScript
I also tried that; it does the same thing (echoes back the path of the file instead of actually doing anything).
Set desktop pictures using AppleScript
well, in that case I suggest you shift gears. If you look at the Finder's scripting dictionary, you'll see that desktop picture is part of the Legacy suite. The Apple preferred way to do this nowadays is to use System Events, as (for example):
tell application "System Events" set picture of every desktop to file "path:to:picture" end tell(note that if you're using a rotating pictures setup, this will work, but the change won't be visible until you turn picture rotation off) |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.08 seconds |
|