If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
Is there a way to change the desktop picture via applescript? I'm trying to write an app, and can find it no where (finder, system events, etc) set desktop picture to file (file path) Worked in earlier version of OSX, any idea's?
Here is an example of one way to set the Desktop to a file in the /Library/Desktop Pictures folder.
Code:
set source_path to path to desktop pictures folder
set new_desktop_pic to (choose file default location source_path with prompt "Choose a new picture…" without invisibles) as alias
tell application "Finder"
set desktop picture to new_desktop_pic
end tell
.
You can change the folder intially presented in the choose window by modifying the first line. For instance, change 'path to desktop pictures folder' to 'path to pictures folder'.