An AppleScript to Launch Backdrop Behind Your Current Application

backdrop-icon.pngA little while back I wrote up another ten freeware apps that Mac users should check out. In the list I included an app called Backdrop. A single-purpose application, Backdrop overlays a picture or solid color on your desktop and hides all any files that may have accumulated there. It’s a great app for taking screenshots with an uncluttered background, but sometimes it’s just nice to be under the illusion that you’re a tidy person (I say this because my desktop is the default dump zone for everything I do on my notebook – it gets cluttered up very quickly).

In any case, here’s a small AppleScript to quickly launch Backdrop behind whatever application you’re currently working in or quit Backdrop if it’s already active.

tell application "System Events" to set dropOn ¬
	to count (every process whose name is "Backdrop")

if dropOn is equal to 1 then
	tell application "Backdrop" to quit
else
	set front_app to (path to frontmost application ¬
		as Unicode text)
	tell application "Backdrop" to activate
	delay 0.1
	tell application front_app to activate
end if

How It Works

This script first checks to see if Backdrop is running. If it is, I’m assuming that it is active behind your frontmost application and the script will quit it. If Backdrop isn’t running, the script will launch it and then activate whatever application was currently active. In other words, the script will toggle Backdrop on and off behind whatever application you happen to be working in.

Get Backdrop from John Haney Software. It’s free!

2 Responses to An AppleScript to Launch Backdrop Behind Your Current Application

  1. You can do “delay 0.1″? Awesome! I have been wanting to do that for the longest of time…

    I haven’t tested this with backdrop (I don’t have it installed) but it does work with iTunes:

    ignoring application responses
    tell application "iTunes" to run
    end

    This will activate iTunes in the background without slowing down the applescript a beat. :)

  2. Okay, I’m thinking that the “run” command is similar to “launch,” as both appear to open the app without actually ‘activating’ it (i.e., making it visible). If that’s the case, I don’t think that it would work in the Backdrop scenario insofar as Backdrop must be activated rather than just launched.

    In essence, Backdrop is just a windowless picture that sits on top of your desktop. I don’t believe that it’s a very complicated app, but I find it really useful.

Think different?