Mac OS: Keyboard Shortcut to Change Wallpaper

I have my wallpaper set up on my Macbook to change images every 5 minutes. It shows images within a particular event that I have set up in iPhoto. This is all fine and nice, but what if I get bored with the image that is randomly chosen?

I found this Applescript by Googling the problem (I modified it a bit):

tell application "System Events"
set rotinterval to change interval of current desktop
set change interval of current desktop to rotinterval
end tell

Simply changing the interval changes the desktop image.

That works… But I wanted to be able to change the background image with a keyboard shortcut (and I didn’t want to install any third party tools). To do this, I went into Automator and created a new Service. I set the service to receive No Input and work in Any Application.

automaterSave this service. I named mine Change Desktop.

Next, go to System Preferences–>Keyboard–>Keyboard Shortcuts–>Services. You should see your new service listed there. Assign a keyboard shortcut (I went with control-0). Voila! I can quickly change my background image any time I get board with the one that is currently displayed.

Advertisements