Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to bind a key to an action that "takes the active windows and moves it to screen S, coordinates X,Y resizes it W,H". The S,X,Y,W,H variables can be hard-coded.

I don't know where to look for, is this doable? Do I need to mess with ActionScript or create an app or what?

(I'm a programmer but I don't know anything about programming/scripting for OSX)


I found out SizeUp which happily does exactly that:

  • a single keystroke, to resize the active window to a pixel specified layout

Now, while I'm happy about that, I'd like to know if there was a program which allowed more than one layout (SizeUp allows only one if I'm not mistaken). It would still have to be single-keystroke and possible to insert pixel precise values.

share|improve this question
possible duplicate of What Window Management Options exist for OS X? – user588 Mar 5 '11 at 18:08

I use a little app called Divvy to do this. You can set up a global hotkey to bring up Divvy. And then within Divvy you can set up hotkeys that will snap the current window to a specific location and a specific size. It's great for quickly doing 2-up Finder windows for copying things back and forth. Or a Finder window on the left and a CyberDuck window on the right for remote copies. One of those apps that, when it's not on a Mac, will make it feel a little bit broken.

share|improve this answer
Thanks. I wasn't able to carve Divvy into what I really wanted (single-key, pixel explicit), but trying to do that I stumbled upon SizeUp, which does exactly that! – o0'. Feb 19 '11 at 15:21
Edited the question to ask if I can do the same thing but with more than one layout. – o0'. Feb 19 '11 at 15:28
set a to path to frontmost application as text
tell application "Finder"
    set {0, 0, dtw, dth} to bounds of window of desktop
end tell
    tell application a to tell window 1
        set bounds to {0, 22, dtw / 2, dth}
    end tell
end try

The behavior with multiple displays is pretty confusing: Daring Fireball: Getting the Size of Your Display With AppleScript, the Lazy Way.

You can assign a shortcut for running it with for example FastScripts, Apptivate, Quicksilver or by making a service with Automator.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.