New topic: OS X: Tiling/Stretch To Fill/Center Desktop Picture in AS
<http://forums.realsoftware.com/viewtopic.php?t=38418> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message pixlgeek Post subject: OS X: Tiling/Stretch To Fill/Center Desktop Picture in ASPosted: Thu Mar 31, 2011 2:09 am Joined: Sat Dec 12, 2009 5:33 pm Posts: 6 Ahoy! After a bit of research, I've come to find that the best and most efficient way to alter the desktop picture is through Apple Script. I have no problem changing the image, however it seems to default to the "Centered" setting. I have managed to get it to change the plist property that sets the Placement of the image however it does not want to actually apply this setting. Here is the AppleScript code I'm using: Code:-- set the picture using System Events: change is immediate -- this rewrites the entire plist tell application "System Events" to set picture of current desktop to "Macintosh HD:screenshot_1.png" -- now go read & change the refreshed plist set plistPath to (path to preferences folder from user domain as text) & "com.apple.desktop.plist" tell application "System Events" set plist to property list file plistPath -- get the 2 keys that describe the desktop picture set theKeys to name of property list items of property list item "Background" of plist --> {"default", "69671552"} -- change one of their keys repeat with aKey in theKeys set value of property list item "Placement" of property list item aKey of property list item "Background" of plist to "Tiled" end repeat end tell Even though I have set the Background Placement property to Tiled and it IS setting the property correctly, it is NOT actually tiling the image. Any help or ideas? Thanks, -pixl Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
