Applescript to change desktop image on all monitors? I have the following code to change the desktop image of my Macbook

tell application "System Events"
tell current desktop
set picture to "/Library/Desktop Pictures/Beach.jpg"
end tell
end tell


How do change all desktops - I have a second monitor.
The previous answers look great, but I wanted to share a way I found to do this with much less code.

tell application "System Events"
    tell every desktop
        set picture to "path/to/picture.png"
    end tell
end tell


You could even condense it to one line:

tell application "System Events" to tell every desktop to set picture to "path/to/picture.png"