10.6: Move and resize app windows via AppleScript

Feb 02, '10 07:30:00AM

Contributed by: philostein

Snow Leopard only hintConcerning the Finder move/resize scripts from this previous hint, there are some issues in Snow Leopard (and perhaps Leopard).

When resizing a window, it will usually not go beyond the edge of the Dock. Even when the Dock is hidden, there will still be a four-pixel gap between the window and the display's edge. This will cause some of the previous scripts to fail. (They'll keep trying to place the window's edge beyond the system's tolerance).

I've updated the scripts to deal with this. You can get them here.

Make sure 'Enable access for assistive devices' is checked in the Universal Access System Preferences panel., and check the original post for usage. The scripts have new names, as the old ones were poor! If you have keyboard shortcuts for these in Quicksilver, you'll need to redirect them to the new scripts.

The Finder window 1 remember position script seems unnecessary in Snow Leopard, so I discarded it. The window resize behaviour can still be a little quirky around the edge of the Dock -- a result of not knowing where the Dock really is using only AppleScript, brain.

A few tips:

[robg adds: I've mirrored the scripts here, too -- but the above URL is a dropbox.com page, so it should be around for a while.]

Comments (0)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20100130231939451