Set Desktop Background droplet
-- It expects that an image is dropped on it's icon
1 2 3 -- 4 -- The on run handler is called if the user has double clicked the icon 5 -- 6 on run 7 display dialog "Please drop an image file on this Icon to set it as the desktop background" 8 end run 9 10 11 -- 12 -- The on open handler is called when the user drags and drops afile on the icon 13 -- 14 on open draggeditems 15 set imageFile to last item of draggeditems 16 17 tell application "Finder" 18 select window of desktop 19 try 20 set desktop picture to file (imageFile as text) 21 on error 22 display dialog "Invalid image file." 23 end try 24 end tell 25 26 end open 27 28 29