This code snippet might be useful for anyone wanting to write a script to resize your application windows automatically to fit on your display.
Note: I’m fairly sure you need to enable UI scripting for this to work.
tell application "System Events" to tell process "Dock"
set dock_dimensions to size in list 1
set dock_width to item 1 of dock_dimensions
set dock_height to item 2 of dock_dimensions
end tell


Thanks! I’ve updated my AppleScript on my blog to include this snippet.
[...] only found it in Java—so if anyone knows feel free to leave a comment. Finally, after seeing this post by Jamie Matthews, I added some functionality to automatically set bottom_bound to the height of [...]
[...] only found it in Java—so if anyone knows feel free to leave a comment. Finally, after seeing this post by Jamie Matthews, I added some functionality to automatically set bottom_bound to the height of [...]
[...] 5. Jamie Matthews’ post on “How to get the dimensions of the dock”. [...]
Thanks for the post Jamie. I used this in a post on my new blog on how to resize windows from the keyboard. Here is a link to the post.
PS Sorry about the domain name change. Unfortunately the pingback above (previous comment) now has the wrong address.